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>