From ab38ffccdf4e0b86b8e6be1ff8c7ce53df74c4ec Mon Sep 17 00:00:00 2001 From: Nicolas Dichtel Date: Tue, 6 Feb 2018 14:48:32 +0100 Subject: [PATCH 1/1] netlink: ensure to loop over all netns in genlmsg_multicast_allns() commit cb9f7a9a5c96a773bbc9c70660dc600cfff82f82 upstream. Nowadays, nlmsg_multicast() returns only 0 or -ESRCH but this was not the case when commit 134e63756d5f 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: 134e63756d5f ("genetlink: make netns aware") CC: Johannes Berg Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller [bwh: Backported to 3.2: s/portid/pid/] Signed-off-by: Ben Hutchings --- Reading git-format-patch failed