netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Safonov <dima@arista.com>
To: Nathan Chancellor <natechancellor@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Steffen Klassert <steffen.klassert@secunet.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH 4.4 106/124] netlink: Do not subscribe to non-existent groups
Date: Sat, 04 Aug 2018 23:33:27 +0100	[thread overview]
Message-ID: <1533422007.2679.141.camel@arista.com> (raw)
In-Reply-To: <20180804180734.GA25546@flashbox>

[-- Attachment #1: Type: text/plain, Size: 743 bytes --]

On Sat, 2018-08-04 at 11:07 -0700, Nathan Chancellor wrote:
> Hi Greg,

Hi Nathan,

> 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-
> >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,

> 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?

-- 
Thanks,
             Dmitry

[-- Attachment #2: netlink_groups.diff --]
[-- Type: text/x-patch, Size: 598 bytes --]

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) {

  reply	other threads:[~2018-08-04 22:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180804082702.434482435@linuxfoundation.org>
2018-08-04  9:01 ` [PATCH 4.4 106/124] netlink: Do not subscribe to non-existent groups Greg Kroah-Hartman
2018-08-04 18:07   ` Nathan Chancellor
2018-08-04 22:33     ` Dmitry Safonov [this message]
2018-08-04 22:49       ` Nathan Chancellor
2018-08-04 23:12         ` Dmitry Safonov
2018-08-04 23:21           ` Nathan Chancellor
2018-08-04 23:25             ` David Miller
2018-08-04 23:26             ` Dmitry Safonov
2018-08-04 23:33               ` David Miller
2018-08-04 23:44                 ` Dmitry Safonov
2018-08-04 23:50                   ` Dmitry Safonov
2018-08-05  0:07                   ` David Miller
2018-08-04 23:47                 ` Dmitry Safonov
2018-08-05  0:08                   ` David Miller
2018-08-05 14:03     ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1533422007.2679.141.camel@arista.com \
    --to=dima@arista.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=steffen.klassert@secunet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).