linux-brain/net/netlink
Nicolas Dichtel 59e105c4cf netlink: ensure to loop over all netns in genlmsg_multicast_allns()
[ Upstream commit cb9f7a9a5c ]

Nowadays, nlmsg_multicast() returns only 0 or -ESRCH but this was not the
case when commit 134e63756d was pushed.
However, there was no reason to stop the loop if a netns does not have
listeners.
Returns -ESRCH only if there was no listeners in all netns.

To avoid having the same problem in the future, I didn't take the
assumption that nlmsg_multicast() returns only 0 or -ESRCH.

Fixes: 134e63756d ("genetlink: make netns aware")
CC: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-11 16:21:32 +01:00
..
Kconfig netlink: remove mmapped netlink support 2016-02-18 11:42:18 -05:00
Makefile netlink: Diag core and basic socket info dumping (v2) 2013-03-21 12:38:03 -04:00
af_netlink.c netlink: put module reference if dump start fails 2018-03-11 16:21:31 +01:00
af_netlink.h af_netlink: ensure that NLMSG_DONE never fails in dumps 2017-11-24 08:33:41 +01:00
diag.c netlink: netlink_diag_dump() runs without locks 2016-11-03 16:16:51 -04:00
genetlink.c netlink: ensure to loop over all netns in genlmsg_multicast_allns() 2018-03-11 16:21:32 +01:00