]> git.baikalelectronics.ru Git - 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)
committerDavid S. Miller <davem@davemloft.net>
Sun, 23 Feb 2020 05:58:33 +0000 (21:58 -0800)
commit124403091463f625a45e023b980df88657a76307
treeeeb14d63e1a74be8a39bf4de03a3ec059e0690ae
parent2ba57e414a722f62d2c86f73f8e79d47f54af488
net: genetlink: return the error code when attribute parsing fails.

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: 61a1afebc302 ("net: genetlink: push attrbuf allocation and parsing to a separate function")
Fixes: fdc640e1121c ("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>
net/netlink/genetlink.c