Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7afaf77 authored by Zheng Yongjun's avatar Zheng Yongjun Committed by Greg Kroah-Hartman
Browse files

fib: Return the correct errno code



[ Upstream commit 59607863c54e9eb3f69afc5257dfe71c38bb751e ]

When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.

Signed-off-by: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 51cc5ad2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1138,7 +1138,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);