lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 3 Sep 2015 08:09:56 -0500
From:	Dimitri Sivanich <sivanich@....com>
To:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc:	Arnd Bergmann <arnd@...db.de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/4] drivers/misc/sgi-gru: remove unused variable

On Thu, Sep 03, 2015 at 10:10:12AM +0530, Sudip Mukherjee wrote:
> On Wed, Sep 02, 2015 at 09:42:04AM -0500, Dimitri Sivanich wrote:
> > On Wed, Sep 02, 2015 at 04:54:55PM +0530, Sudip Mukherjee wrote:
> > > These variables were only assigned some value and were never used.
> > > 
> > > Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
> > > ---
> > > 
> <snip>
> > > +	int i;
> > +
> > + 	if ((GRU_NUM_TFM * GRU_CACHE_LINE_BYTES) > (ubufend - ubuf))
> > +		return -EFBIG;
> Just a minor (or major) doubt.
> The function returns GRU_NUM_TFM * GRU_CACHE_LINE_BYTES and the for loop
> is also running till GRU_NUM_TFM so I am assuming that the function can
> handle buffer till size of GRU_NUM_TFM * GRU_CACHE_LINE_BYTES. So the
> error -EFBIG should occur when the buffer is more than this. Then
> shouldn't it be:
> if ((GRU_NUM_TFM * GRU_CACHE_LINE_BYTES) < (ubufend - ubuf))
> 	return -EFBIG;
> 
> or i am wrong in interpreting it?
>
The likely intent was to return an error when the buffer isn't big enough
to hold GRU_NUM_TFM * GRU_CACHE_LINE_BYTES.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ