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

Subsystems: networking [general], the rest

STALE2012d LANDED

Landed in mainline as 247b557ee52a on 2021-02-06.

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

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

From: Zheng Yongjun <hidden>
Date: 2021-02-04 07:28:36

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

Signed-off-by: Zheng Yongjun <redacted>
---
 net/dccp/feat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/dccp/feat.c b/net/dccp/feat.c
index 788dd629c420..4cb813bee7b4 100644
--- a/net/dccp/feat.c
+++ b/net/dccp/feat.c
@@ -371,7 +371,7 @@ static int dccp_feat_clone_sp_val(dccp_feat_val *fval, u8 const *val, u8 len)
 		fval->sp.vec = kmemdup(val, len, gfp_any());
 		if (fval->sp.vec == NULL) {
 			fval->sp.len = 0;
-			return -ENOBUFS;
+			return -ENOMEM;
 		}
 	}
 	return 0;
-- 
2.22.0

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

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

Hello:

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

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

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

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