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]
Message-ID: <dcefdd75-643f-4492-9e65-8b289cbf418e@stanley.mountain>
Date: Thu, 21 Nov 2024 21:55:33 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Paolo Perego <pperego@...e.de>
Cc: linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Dave Penkler <dpenkler@...il.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Kees Bakker <kees@...erbout.nl>, Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH v2] staging:gpib: Fix a dereference before null check
 issue

On Thu, Nov 21, 2024 at 04:22:21PM +0100, Paolo Perego wrote:
> This commit fixes a dereference before null check issue discovered by 
> Coverity (CID 1601566).
> 
> The check at line 1450 suggests that a_priv can be NULL, however it has
> been dereferenced before, in the interface_to_usbdev() call.
> 
> After a discussion, the NULL check is useless because private data is allocated
> in attach routine and freed in detach routine, so in detach routine the pointer
> has to be not NULL for sure.
> 
> Signed-off-by: Paolo Perego <pperego@...e.de>
> Fixes: Removes a useless NULL check

This isn't how the Fixes tag works.  It's supposed to refer to the patch which
introduces the static checker warning.
Fixes: fbae7090f30c ("staging: gpib: Update messaging and usb_device refs in agilent_usb")

The patch has a couple checkpatch issues as well.  Please, fix those up and
resend.

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ