diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2021-06-02 17:06:58 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-04 01:13:56 +0300 |
commit | 59607863c54e9eb3f69afc5257dfe71c38bb751e (patch) | |
tree | 2817a727b8f9396935062ed681fdd73d09910ccc /net/core/fib_rules.c | |
parent | 49251cd00228a3c983651f6bb2f33f6a0b8f152e (diff) | |
download | linux-59607863c54e9eb3f69afc5257dfe71c38bb751e.tar.xz |
fib: Return the correct errno code
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>
Diffstat (limited to 'net/core/fib_rules.c')
-rw-r--r-- | net/core/fib_rules.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index cd80ffed6d26..a9f937975080 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c @@ -1168,7 +1168,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); |