Thread (15 messages) 15 messages, 4 authors, 2018-08-05

Re: [PATCH 4.4 106/124] netlink: Do not subscribe to non-existent groups

From: Nathan Chancellor <hidden>
Date: 2018-08-04 22:50:18
Also in: lkml, stable

On Sat, Aug 04, 2018 at 11:33:27PM +0100, Dmitry Safonov wrote:
On Sat, 2018-08-04 at 11:07 -0700, Nathan Chancellor wrote:
quoted
Hi Greg,
Hi Nathan,
quoted
I am so sorry I didn't catch this in my initial report but this
commit
along with ba7aaf93ef2f ("netlink: Don't shift with UB on nlk-
quoted
ngroups")
breaks mobile data on both the Pixel 2 XL and OnePlus 6. There is
signal
but it just never connects to 3G/LTE. Reverting those two commits
fixes
the issue.
Sorry for breaking your use-case,
No apologies necessary, thank you for the quick response!
quoted
Nothing stands out to me in dmesg unfortunately and iven neither
device
is running a vanilla kernel, I cannot say if this is a problem in
mainline
or not but I just wanted to make you aware of it.
Could you provide the dmesg output for the attached debug diff?
dmesg output attached, please let me know if you need anything else.
-- 
Thanks,
             Dmitry
quoted hunk ↗ jump to hunk
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 7d860a22e5fb..0cddc35e1e87 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1009,10 +1009,14 @@ static int netlink_bind(struct socket *sock, struct sockaddr *addr,
 			return err;
 	}
 
-	if (nlk->ngroups == 0)
+	if (nlk->ngroups == 0) {
 		groups = 0;
-	else
+	} else {
+		if (groups != (groups & ((1ULL << nlk->ngroups) - 1)))
+			pr_alert("%s: groups: %#lx ngroups: %u\n",
+				current->comm, groups, nlk->ngroups);
 		groups &= (1ULL << nlk->ngroups) - 1;
+	}
 
 	bound = nlk->bound;
 	if (bound) {
Cheers!
Nathan

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help