From: Zheng Yongjun Date: Wed, 2 Jun 2021 14:06:58 +0000 (+0800) Subject: fib: Return the correct errno code X-Git-Tag: v4.19.196~89 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7e3f278d55b0677aa82d07ba521390c8b090ee69;p=users%2Fdwmw2%2Flinux.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 8916c5d9b3b3a..46a13ed15c4e8 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c @@ -1105,7 +1105,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);