From: Zheng Yongjun Date: Wed, 2 Jun 2021 14:06:58 +0000 (+0800) Subject: fib: Return the correct errno code X-Git-Tag: v4.9.274~56 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f39f284140d274267f2bb53ce991e3db5be9beb3;p=thirdparty%2Fkernel%2Fstable.git fib: Return the correct errno code [ 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 --- diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index 9f172906cc889..cc6e7ca0aff5a 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c @@ -767,7 +767,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);