[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210204072939.17892-1-zhengyongjun3@huawei.com>
Date: Thu, 4 Feb 2021 15:29:39 +0800
From: Zheng Yongjun <zhengyongjun3@...wei.com>
To: <davem@...emloft.net>, <kuznet@....inr.ac.ru>,
<yoshfuji@...ux-ipv6.org>, <kuba@...nel.org>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: Zheng Yongjun <zhengyongjun3@...wei.com>
Subject: [PATCH net-next] ipv6: Return the correct errno code
When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.
Signed-off-by: Zheng Yongjun <zhengyongjun3@...wei.com>
---
net/ipv6/addrconf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 8b6eb384bac7..347b95bc00fd 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -6943,7 +6943,7 @@ static int __addrconf_sysctl_register(struct net *net, char *dev_name,
free:
kfree(table);
out:
- return -ENOBUFS;
+ return -ENOMEM;
}
static void __addrconf_sysctl_unregister(struct net *net,
--
2.22.0
Powered by blists - more mailing lists