From f185de2b4ecff4304be64bb20ff7bef33b43fba0 Mon Sep 17 00:00:00 2001 From: Subash Abhinov Kasiviswanathan Date: Wed, 1 Nov 2017 15:35:37 -0600 Subject: [PATCH] ANDROID: GKI: Revert "genetlink: disallow subscribing to unknown mcast groups" Commit 5ad6300524c0332 ("genetlink: disallow subscribing to unknown mcast groups") disallows userspace to subscribe to groups that don't exist in kernel. As a result, communication between processes is not possible unless they explicitly register a dummy group with the kernel even if the communication is between userspace processes only. NETLINK_USERSOCK cannot be used here since userspace processes would require CAP_NET_ADMIN to receive multicast messages which is available for priveleged processes only. Fix this problem by reverting the change till a solution is determined internally and upstream discussion. Bug: 158311262 CRs-Fixed: 2086060 Change-Id: Id559d9ef9d1e0a25e3bbdc81503978f01c6ed85f Signed-off-by: Subash Abhinov Kasiviswanathan (cherry-picked from commit 047570fa7c5dde6fe17923f5e5fa48b5e6e80203) Signed-off-by: Suren Baghdasaryan Change-Id: Id559d9ef9d1e0a25e3bbdc81503978f01c6ed85f --- net/netlink/genetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index f0ec068e1d02..cec2caaf34f0 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c @@ -964,7 +964,7 @@ static struct genl_family genl_ctrl __ro_after_init = { static int genl_bind(struct net *net, int group) { struct genl_family *f; - int err = -ENOENT; + int err = 0; unsigned int id; down_read(&cb_lock);