]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: ensure to loop over all netns in genlmsg_multicast_allns()
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Tue, 6 Feb 2018 13:48:32 +0000 (14:48 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Feb 2018 19:03:18 +0000 (14:03 -0500)
commit7413d5044647ae401d5bc03fbf92aa2306895d78
treebbd5a31b8a13d94e94321dcf56960e6f91f88000
parent088ac9d144ac119fc5fb356c4895dbb9ceb5d67f
netlink: ensure to loop over all netns in genlmsg_multicast_allns()

Nowadays, nlmsg_multicast() returns only 0 or -ESRCH but this was not the
case when commit 518e350684aa 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: 518e350684aa ("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>
net/netlink/genetlink.c