From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net ([23.128.96.9]:58330 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729600AbeHEB1y (ORCPT ); Sat, 4 Aug 2018 21:27:54 -0400 Date: Sat, 04 Aug 2018 16:25:29 -0700 (PDT) Message-Id: <20180804.162529.304855987892193419.davem@davemloft.net> To: natechancellor@gmail.com Cc: dima@arista.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, herbert@gondor.apana.org.au, steffen.klassert@secunet.com, netdev@vger.kernel.org Subject: Re: [PATCH 4.4 106/124] netlink: Do not subscribe to non-existent groups From: David Miller In-Reply-To: <20180804232102.GA3982@flashbox> References: <20180804224956.GA5384@flashbox> <1533424322.2679.144.camel@arista.com> <20180804232102.GA3982@flashbox> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: From: Nathan Chancellor Date: Sat, 4 Aug 2018 16:21:02 -0700 > On Sun, Aug 05, 2018 at 12:12:02AM +0100, Dmitry Safonov wrote: >> On Sat, 2018-08-04 at 15:49 -0700, Nathan Chancellor wrote: >> > dmesg output attached, please let me know if you need anything else. >> >> Could you try with this diff instead? >> It looks like, I'm too bad with shifts and shifted for 64 bytes. >> >> -- >> Thanks, >> Dmitry > >> diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c >> index 7d860a22e5fb..b78bb7dc06fe 100644 >> --- a/net/netlink/af_netlink.c >> +++ b/net/netlink/af_netlink.c >> @@ -1011,7 +1011,7 @@ static int netlink_bind(struct socket *sock, struct sockaddr *addr, >> >> if (nlk->ngroups == 0) >> groups = 0; >> - else >> + else if (nlk->ngroups < 64) >> groups &= (1ULL << nlk->ngroups) - 1; >> >> bound = nlk->bound; > > This fixed my issue. If needed: > > Tested-by: Nathan Chancellor Dmitry please submit this formally for net+stable wit Nathan's tested-by. Thanks.