]> git.ipfire.org Git - people/arne_f/kernel.git/commit
net: genetlink: return the error code when attribute parsing fails.
authorPaolo Abeni <pabeni@redhat.com>
Fri, 21 Feb 2020 18:42:13 +0000 (19:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Apr 2020 07:10:05 +0000 (09:10 +0200)
commit0b449baa8feb7c987b56a2c46b1a75ccc16045af
treedc51a7aa8721ed1793272d5040235ad6baed5348
parent940bbedcdc078fdb9e7f434da4fa05ea01b9651f
net: genetlink: return the error code when attribute parsing fails.

commit 39f3b41aa7cae917f928ef9f31d09da28188e5ed upstream.

Currently if attribute parsing fails and the genl family
does not support parallel operation, the error code returned
by __nlmsg_parse() is discarded by genl_family_rcv_msg_attrs_parse().

Be sure to report the error for all genl families.

Fixes: c10e6cf85e7d ("net: genetlink: push attrbuf allocation and parsing to a separate function")
Fixes: ab5b526da048 ("net: genetlink: always allocate separate attrs for dumpit ops")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netlink/genetlink.c