Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3742253pxv; Mon, 28 Jun 2021 11:39:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwu6AyEoT65J3RVg0UqZDY1+rAjntRbYJjPjH+hlKZbMCRLnIndFGqWmmqD2NDH+Aoz5IFV X-Received: by 2002:a05:6638:3398:: with SMTP id h24mr882944jav.128.1624905572814; Mon, 28 Jun 2021 11:39:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624905572; cv=none; d=google.com; s=arc-20160816; b=hVODqulKTCI2FfyhACB6gA5PkxWRnq0KVXvCr2KLCQtGqrD0YypDd6XAVK6RUTmK46 rrf1TMcHc3pSmsYkkN484YjkEXfge4msSvK+6rQjQujWO1JfQ1Qim0lGtSs/BSo3DWXW MK8A5V9tW6/qmxYF7+k0pqkqi1ooT8Trlw6x/TKaxJ1NWpK1bV4sP+vbmBgKmKgACbGU iXBTg67wYNBz9Q1QydMDvmCs9pseG3sfCMoxG7+yMrEXF9OFQIXDhc6sE5TS6rIkxHsL BusYp+lL48Y0TpkLTJYRVH8vnMMrcAyW6Wjn939ghip3WV2BvBOXJjUwL0NARUsbaBic RYdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1EVKHrmejMF+Xl106gI3DM7Qzk7MAhDZKXd8FyexwBo=; b=EmeVJt3hp8H7VJXcKACRLe4qtddMf+dcC3g667W7FPqLDOSCA1glVmJcFfW90ZLHpt kEwK20PgddJDqUMlKDrM7G2QyVpySGZp6qzl3uFTHyAkQIYnBdnzQ8MiD0VbgMpTC2p1 cKgZ35pb1feb7kwzycVbAYQ1UwIP0fPCcC3HPFOYBbNAxvjBMpBGQ9ALTOZnauP8gqYR Ppgrcm1JmFMR+TqhP+WSbPoUzxY5BzzhohobqKlwNTh2L0tViW4FlYlCuAL/OqaOY0UO Q2r3s/8ofIyTj6OIaPqWu6s4cNt4E24eyckT9mqlCtMziXTqkU3p35xtjFQaqOnKwq+1 EYtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BnuNTFUx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k9si4915280jav.118.2021.06.28.11.39.16; Mon, 28 Jun 2021 11:39:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BnuNTFUx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236325AbhF1PJO (ORCPT + 99 others); Mon, 28 Jun 2021 11:09:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:55958 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233925AbhF1Osr (ORCPT ); Mon, 28 Jun 2021 10:48:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F22CB61CA5; Mon, 28 Jun 2021 14:36:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891003; bh=+p6Ru1HAnt4vdsR80m3zPO30bLQzBT3Pqydpwqgfn60=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BnuNTFUx+DhONKm7V6NrPm9FeFNI/HdPtT77Msgbd2a4+X+wYiF9YA7o8PyhzY7Bj 4ss/61h89HHLd/tRjNxmSiTx8Vc4SAq6ROhaCRfjophDEs661zUYW1wFUMwQlksuZC ilwGnCkUbQGC9oOt7JpVAA0Yt4NKDPVlv+qu4mnCrdaXlEVw0Vnc3naF2nijvED0HN hGhvpZ4+TAJBnz2mvz/SEe7plqtXUl9GRBRsYEVKNT1sbDCyHzcG+D77BKyz6rGpNf ErXLlzfkO3+Zg7tLvQN9v7HAHrZsvqR4SnySVtg1dmV+1S/sRxQOJKz3KaqFxaHJ3H 6epFBbYRPkqSA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Zheng Yongjun , "David S . Miller" , Sasha Levin Subject: [PATCH 4.14 15/88] net/x25: Return the correct errno code Date: Mon, 28 Jun 2021 10:35:15 -0400 Message-Id: <20210628143628.33342-16-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210628143628.33342-1-sashal@kernel.org> References: <20210628143628.33342-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.238-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.14.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.14.238-rc1 X-KernelTest-Deadline: 2021-06-30T14:36+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zheng Yongjun [ Upstream commit d7736958668c4facc15f421e622ffd718f5be80a ] When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/x25/af_x25.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 987e5f8cafbe..fd0a6c6c77b6 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -550,7 +550,7 @@ static int x25_create(struct net *net, struct socket *sock, int protocol, if (protocol) goto out; - rc = -ENOBUFS; + rc = -ENOMEM; if ((sk = x25_alloc_socket(net, kern)) == NULL) goto out; -- 2.30.2