Thread (12 messages) flat view 12 messages, 5 authors, 2d ago

Re: [PATCH net-next v2 1/3] netdev: correct error code in netdev_nl_queue_fill_lease()

From: Nikolay Aleksandrov <razor@blackwall.org>
Date: 2026-09-01 06:58:22

On 31/08/2026 19:41, Jakub Kicinski wrote:
quoted hunk ↗ jump to hunk
netdev_nl_queue_fill_lease() returns ENOMEM on nla_put failures.
This is wrong, the error code should be EMSGSIZE. But it doesn't
matter, caller of netdev_nl_queue_fill_lease() just checks if
the retcode is zero or not, and uses EMSGSIZE.

Reviewed-by: Joe Damato <redacted>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Bobby Eshleman <redacted>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
  net/core/netdev-genl.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/netdev-genl.c b/net/core/netdev-genl.c
index cb18db681640..04dcd7fc614e 100644
--- a/net/core/netdev-genl.c
+++ b/net/core/netdev-genl.c
@@ -434,7 +434,7 @@ netdev_nl_queue_fill_lease(struct sk_buff *rsp, struct net_device *netdev,
  nla_put_failure_unlock:
  	rcu_read_unlock();
  nla_put_failure:
-	return -ENOMEM;
+	return -EMSGSIZE;
  }
  
  static int
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help