* [PATCH] net: return correct error code
@ 2021-11-15 8:14 liuguoqiang
2021-11-15 14:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: liuguoqiang @ 2021-11-15 8:14 UTC (permalink / raw)
To: davem; +Cc: yoshfuji, dsahern, kuba, linux-kernel, netdev, liuguoqiang
When kmemdup called failed and register_net_sysctl return NULL, should
return ENOMEM instead of ENOBUFS
Signed-off-by: liuguoqiang <liuguoqiang@uniontech.com>
---
net/ipv4/devinet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index ec73a0d52d3e..323e622ff9b7 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -2591,7 +2591,7 @@ static int __devinet_sysctl_register(struct net *net, char *dev_name,
free:
kfree(t);
out:
- return -ENOBUFS;
+ return -ENOMEM;
}
static void __devinet_sysctl_unregister(struct net *net,
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: return correct error code
2021-11-15 8:14 [PATCH] net: return correct error code liuguoqiang
@ 2021-11-15 14:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-15 14:30 UTC (permalink / raw)
To: liuguoqiang; +Cc: davem, yoshfuji, dsahern, kuba, linux-kernel, netdev
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Mon, 15 Nov 2021 16:14:48 +0800 you wrote:
> When kmemdup called failed and register_net_sysctl return NULL, should
> return ENOMEM instead of ENOBUFS
>
> Signed-off-by: liuguoqiang <liuguoqiang@uniontech.com>
> ---
> net/ipv4/devinet.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- net: return correct error code
https://git.kernel.org/netdev/net/c/6def480181f1
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-15 14:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 8:14 [PATCH] net: return correct error code liuguoqiang
2021-11-15 14:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).