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 Acked-by: Daniel Borkmann Reviewed-by: Bobby Eshleman Signed-off-by: Jakub Kicinski --- 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 -- 2.55.0