Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp889083pxj; Wed, 16 Jun 2021 16:23:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBnCYk0RFQOk/hErAI0vOyWcV0JbFIk6Nvs8w8jqyL1SexYZ37gv6Q9HX9QXBffERMhhun X-Received: by 2002:a02:a710:: with SMTP id k16mr1614810jam.46.1623885791313; Wed, 16 Jun 2021 16:23:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623885791; cv=none; d=google.com; s=arc-20160816; b=G4qqdggDYvhPfid8FgEKKsEnVUqTILtZW9ZmolIe29egQEWHeGGNMi0/mh9UZN2HGU jZkeZoTQL8uqh3L6kMDW3DPLXNpWJASOsWnWDv402Af130XumowXVvj99dFyDUVJ8Rei MsNQKJM6ymx6IXrF3oNmoPcOg0nA8WMMESPRvief5oihfSYIeZ8hGllh/1mFhsWuynK7 sKefDlQ4AvOsTHutJNo1qkrPIR+8xMh/GuwRtuhr5y3nyJ0bjmT/BKuvjDX3zNMsm34S aco5sYxy026Tj8tqI6zdTP5tdUeewP00NKkBk4cHs+deYOVI0jsLgkEPgNqJTkX2IOFZ 83WA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BFSjZH4VeHAKAf60SMWS4btVKfeP7y9uY+N6d84uSFM=; b=J+H2jKCt1vZtGqRoMdQsVWQXzmlclSISBa4X8RBjN+VqOqjZgId7dUDxKLa9wAuWeS h4+kMkloZ/vuIahN9NRuukWXzDWHgMB0vXmrCUo/t5S4WIjXxIHYcRyynhG0PzGeFYrE CbquPE9mIw2fyxu5EtJ1ky4gTs7xe3BEAo/FrKlEGzUS1rORrJQKAUIejAupeUODPvTb JO4NFin+SSwxr/0A2qnnw9ilmEAHxpqz32U1xLHkqayq3M4xlqv4uWxOg3gs7zOYKA04 T+tkOkuzGQc+DQKS9a14+/GVoLBJty6GSWAASg2R83MqnWMP2vyFe53egBYE7azp3+JK lU7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=o8riaySr; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n11si3153419ioz.48.2021.06.16.16.22.59; Wed, 16 Jun 2021 16:23:11 -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=@linuxfoundation.org header.s=korg header.b=o8riaySr; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235505AbhFPPpV (ORCPT + 99 others); Wed, 16 Jun 2021 11:45:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:50548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234799AbhFPPmK (ORCPT ); Wed, 16 Jun 2021 11:42:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 299E660FE3; Wed, 16 Jun 2021 15:38:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623857883; bh=nHcMRLpN5ldCubkcU2AC1AimNWKK5ugryO39+kTcoAA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o8riaySrUI3cDU5C9yHlJXut0pZsXaK4Go/zJCLEyqqV383BoyIanXsOQqTcF0RFa kyQXj42E4FDtBEfQJP7/JN3YAwj9Hkqx41KLqtF1y7IjaVbYqbt5xxkZSs4oaPs00B 0Fx3d0VNIBo0egUzTyEFLRVuhe9gJq8/qvrIHYIc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zheng Yongjun , "David S. Miller" , Sasha Levin Subject: [PATCH 5.12 48/48] fib: Return the correct errno code Date: Wed, 16 Jun 2021 17:33:58 +0200 Message-Id: <20210616152838.151047356@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210616152836.655643420@linuxfoundation.org> References: <20210616152836.655643420@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 cd80ffed6d26..a9f937975080 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c @@ -1168,7 +1168,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