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 <zhengyongjun3@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
d8b2e3e17c
commit
808fcc1e70
@@ -1168,7 +1168,7 @@ static void notify_rule_change(int event, struct fib_rule *rule,
|
|||||||
{
|
{
|
||||||
struct net *net;
|
struct net *net;
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
int err = -ENOBUFS;
|
int err = -ENOMEM;
|
||||||
|
|
||||||
net = ops->fro_net;
|
net = ops->fro_net;
|
||||||
skb = nlmsg_new(fib_rule_nlmsg_size(ops, rule), GFP_KERNEL);
|
skb = nlmsg_new(fib_rule_nlmsg_size(ops, rule), GFP_KERNEL);
|
||||||
|
Reference in New Issue
Block a user