From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Date: Wed, 10 Oct 2012 11:15:16 +0000 Subject: Re: [patch] isdn: fix a wrapping bug in isdn_ppp_ioctl() Message-Id: <1349867716.2386.35.camel@joe-AO722> List-Id: References: <20121010093816.GA3669@elgon.mountain> <1349864358.2386.27.camel@joe-AO722> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: David Laight Cc: Dan Carpenter , Karsten Keil , "David S. Miller" , Masanari Iida , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org On Wed, 2012-10-10 at 11:42 +0100, David Laight wrote: > > - unsigned long protos[8] = {0,}; > > + DECLARE_BITMAP(protos, BITS_PER_LONG * 8) = { 0, }; > ... > > - if ((r = set_arg(argp, protos, 8 * sizeof(long)))) > > + if ((r = set_arg(argp, protos, sizeof(protos)))) > > That change makes a big assumption about the implementation > of DECLARE_BITMAP(). > Unless it is guaranteed to be implemented as 'unsigned long[]' > then you've changed what the code might do. Possible, but it's hard to imagine it changing. The = { 0, } should probably be bitmap_zero