Skip to contentSkip to conversation

vxlan: fix error return code in vxlan_fdb_append

PATCH Applied Hongbin Wang 2 participants 2 messages Apr 7, 2022 – Apr 8, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vxlan: fix error return code in vxlan_fdb_append

When kmalloc and dst_cache_init failed,
should return ENOMEM rather than ENOBUFS.

---
 drivers/net/vxlan/vxlan_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/vxlan/vxlan_core.c +2 -2
index de97ff98d36e..8a5e3a6d32d7 100644
@@ -651,11 +651,11 @@ static int vxlan_fdb_append(struct vxlan_fdb *f,
 
 	rd = kmalloc(sizeof(*rd), GFP_ATOMIC);
 	if (rd == NULL)
-		return -ENOBUFS;
+		return -ENOMEM;
 
 	if (dst_cache_init(&rd->dst_cache, GFP_ATOMIC)) {
 		kfree(rd);
-		return -ENOBUFS;
+		return -ENOMEM;
 	}
 
 	rd->remote_ip = *ip;
Signature · 1 line
2.25.1
#1 lore raw
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:

Quoted 7 lines · On Wed, 6 Apr 2022 22:46:22 -0400 you wrote:

When kmalloc and dst_cache_init failed,
should return ENOMEM rather than ENOBUFS.

---
 drivers/net/vxlan/vxlan_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Here is the summary with links:
- vxlan: fix error return code in vxlan_fdb_append

    https://git.kernel.org/netdev/net/c/7cea5560bf65

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html