Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3743000pxv; Mon, 28 Jun 2021 11:40:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRvXLSO8kyDLxS03aEku1iW2Y8NzKgDgucoalfJTbcOu67Zzw9GeZ9mWy3qkcgDpuUeqGa X-Received: by 2002:a02:84a3:: with SMTP id f32mr866029jai.63.1624905644478; Mon, 28 Jun 2021 11:40:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624905644; cv=none; d=google.com; s=arc-20160816; b=Kx2hVqjSHjNejW0qm3K4ygGej7DJw0KMV9IT3B5/eSI9XGrpK9zTYN6mt0juWdstd6 cMuZl2PUoJJJmqq1A6n3u4wGsFNsJMzLCYt1HPPBx4us9r78xg3nKKhqVbp34ZFgs57Q 5x5YF2MxALunTykxHPSz0bRb/sW+Wte5xISibs4txLG4awE8yX0o/HKKRFHIfnCr40mr 8lTX0ry0UDU8Onr8qZjSx6JJkD+s+J2UISNF296M+vccjmANmIu2lQJlkxlbn8fWnVzV mSc8iTAg5mOfhAOH5Louic6Z3MwCY03m6Ezx6bM1l2ScgWip1Xpgw+DOaNG3BZ0po7x+ oBRw== 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=vT5MqgU0kZT6wFW92zvsn3Sp/boG+ocM+58TLVT1EUQ=; b=qE10OhaTfMgmrOT8xxwOx01TlN8+NZ7QC5yioa9ROO7myaXCHPpqUF40uVtWG5RbGm 8Ar9TEX4aOGZIxkmjJEEnAlDgiweMxC0QzpLs9tPUgvaiWjJimZX+Mty4W1m0yzBQyAQ XuSi0MlJi7o7Sw5d6z8MGUq9FQRoXXYR95dRSmxR3Xui2nyGF6i6FWKzU2Rut/QRDNDc ctC+6Ex+ORENSlNm55PHp4ZkpOZnuaV2hQooiaZgQbI8TzjlhxgpxfVLe4ujEcHRcI+M 1d2kT60We1qsSCUh1yuLkqX3ZVi2DW+IKgsL3aWfgH2VtNANzFO4URCQbmTCQlpoQUEu jqjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=L11WCiO9; 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 g2si23161526ioo.75.2021.06.28.11.40.30; Mon, 28 Jun 2021 11:40:44 -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=L11WCiO9; 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 S236377AbhF1PJV (ORCPT + 99 others); Mon, 28 Jun 2021 11:09:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:56020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234079AbhF1Osv (ORCPT ); Mon, 28 Jun 2021 10:48:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7A35A61CB0; Mon, 28 Jun 2021 14:36:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624891005; bh=twh378NggV09c+mbgtGzr3Ox3Zd37cYIsMXiN5MHSaI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L11WCiO9XfF6IT3rWIG3QIJubr3d+FUi/XY65S58KsJYFjt4Crm9FDx5+/UqZJ5EL MnICMv/ZirFRZz/M6Ue7p/r6fJrXiYQwaGxILYKjBTplir54T+NAWqWDK9+HnSk4cf 1BWvW8jA+kzgFoYNf88MQvmjesvLrHm1wX5Ws/DEu1Fpdh8neRmZ57CywhbcMplg+n jf1jB+sFyMorxRE0ZSVM4+O1TVms+P0JVixxchnaPqoibUApy4FZZe+UZaWHS9fEn7 I2oWVcr0vgXPccpryrQ69RzUSBsjdyzkb4CDtY8J43bwLyBp5n0Z3cqGpYknpEW3ea jaYHrcSn9Is0w== 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 17/88] fib: Return the correct errno code Date: Mon, 28 Jun 2021 10:35:17 -0400 Message-Id: <20210628143628.33342-18-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 59607863c54e9eb3f69afc5257dfe71c38bb751e ] 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/core/fib_rules.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index 9bb321df0869..76c3f602ee15 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c @@ -928,7 +928,7 @@ static void notify_rule_change(int event, struct fib_rule *rule, { struct net *net; struct sk_buff *skb; - int err = -ENOBUFS; + int err = -ENOMEM; net = ops->fro_net; skb = nlmsg_new(fib_rule_nlmsg_size(ops, rule), GFP_KERNEL); -- 2.30.2