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: <CAFo99gbJQBQbHKz3nxZfW_RMGjHbYKbCeAPSghGkbcJC5u4qLg@mail.gmail.com>
Date:	Fri, 30 May 2014 01:05:22 +0200
From:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To:	Tomas Henzl <thenzl@...hat.com>
Cc:	Christoph Hellwig <hch@...radead.org>,
	Wang Jinpu <xjtuwjp@...il.com>,
	lindar_liu <lindar_liu@...sh.com>,
	"James E.J. Bottomley" <JBottomley@...allels.com>,
	linux-scsi@...r.kernel.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] scsi: pm8001: pm8001_hwi.c: Fix for possible null pointer dereference

Hi

Quite rightly, this is what cppcheck reacts.
Ok, I'll send a patch for that instead then.


Best regards
Rickard Strandqvist


2014-05-28 13:38 GMT+02:00 Tomas Henzl <thenzl@...hat.com>:
> On 05/28/2014 01:28 PM, Christoph Hellwig wrote:
>> On Sun, May 18, 2014 at 06:14:00PM +0200, Rickard Strandqvist wrote:
>>> There is otherwise a risk of a possible null pointer dereference.
>>>
>>> Was largely found by using a static code analysis program called cppcheck.
>> I can't see how dev->lldd_dev would be NULL here.
>
> The analysis program likely can't know that, the reason for this report
> it that dev->lldd_dev is tested for not being null several lines below -
> http://lxr.free-electrons.com/source/drivers/scsi/pm8001/pm8001_hwi.c#L4447
> So the other option is to remove this^ test.
>
--
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