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

Commit 1b20c28d authored by Zheng Yongjun's avatar Zheng Yongjun Committed by Sasha Levin
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 3d712b7c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -695,7 +695,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);