From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Safonov Subject: Re: [PATCH] netlink: Don't shift with UB on nlk->ngroups Date: Mon, 30 Jul 2018 20:50:29 +0100 Message-ID: <1532980229.2679.34.camel@arista.com> References: <20180730173236.20968-1-dima@arista.com> <20180730.124330.538236571439983894.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, rong.a.chen@intel.com, 0x7f454c46@gmail.com, herbert@gondor.apana.org.au, steffen.klassert@secunet.com, netdev@vger.kernel.org To: David Miller Return-path: Received: from mail-ed1-f67.google.com ([209.85.208.67]:33841 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731914AbeG3V1F (ORCPT ); Mon, 30 Jul 2018 17:27:05 -0400 Received: by mail-ed1-f67.google.com with SMTP id h1-v6so4613930eds.1 for ; Mon, 30 Jul 2018 12:50:31 -0700 (PDT) In-Reply-To: <20180730.124330.538236571439983894.davem@davemloft.net> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 2018-07-30 at 12:43 -0700, David Miller wrote: > From: Dmitry Safonov > Date: Mon, 30 Jul 2018 18:32:36 +0100 > > > On i386 nlk->ngroups might be 32 or 0. Which leads to UB, resulting > in > > hang during boot. > > Check for 0 ngroups and use (unsigned long long) as a type to > shift. > > > > Fixes: commit 7acf9d4237c46894e0fa0492dd96314a41742e84 ("netlink: > Do not > > subscribe to non-existent groups"). > > Please, in the future, format your Fixes: tag correctly. No need > to say the work "commit", please do not chop up the line no matter > how long it is, and please provide 12 digits of SHA1_ID value, rather > than the whole thing. Oh, yeah, I have this in .gitconfig: [core] abbrev = 12 But I was formatting this not on my laptop and have managed to mislook. Sorry about "commit" and the breakage. > > Reported-by: kernel test robot > > Signed-off-by: Dmitry Safonov > > Applied, thank you. Thank you.