[PATCH net-next] net: sched: Return the correct errno code

Subsystems: networking [general], tc subsystem, the rest

STALE2004d LANDED

Landed in mainline as a64566a22b6a on 2021-02-06.

2 messages, 2 authors, 2021-02-06 · open the first message on its own page

[PATCH net-next] net: sched: Return the correct errno code

From: Zheng Yongjun <hidden>
Date: 2021-02-04 07:39:51

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

Signed-off-by: Zheng Yongjun <redacted>
---
 net/sched/em_nbyte.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/em_nbyte.c b/net/sched/em_nbyte.c
index 2c1192a2ee5e..a83b237cbeb0 100644
--- a/net/sched/em_nbyte.c
+++ b/net/sched/em_nbyte.c
@@ -31,7 +31,7 @@ static int em_nbyte_change(struct net *net, void *data, int data_len,
 	em->datalen = sizeof(*nbyte) + nbyte->len;
 	em->data = (unsigned long)kmemdup(data, em->datalen, GFP_KERNEL);
 	if (em->data == 0UL)
-		return -ENOBUFS;
+		return -ENOMEM;
 
 	return 0;
 }
-- 
2.22.0

Re: [PATCH net-next] net: sched: Return the correct errno code

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-02-06 19:22:29

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Thu, 4 Feb 2021 15:39:50 +0800 you wrote:
When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF.

Signed-off-by: Zheng Yongjun <redacted>
---
 net/sched/em_nbyte.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
  - [net-next] net: sched: Return the correct errno code
    https://git.kernel.org/netdev/net-next/c/a64566a22b6a

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help