[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170530174027.Horde.AYiQnLwlE09KhkcqzdNaVTk@gator4166.hostgator.com>
Date: Tue, 30 May 2017 17:40:27 -0500
From: "Gustavo A. R. Silva" <garsilva@...eddedor.com>
To: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
Cc: Peter Huewe <peterhuewe@....de>,
Marcel Selhorst <tpmdd@...horst.net>,
Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
tpmdd-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] char: tpm: fix potential null pointer dereference
Hi Jason,
Quoting Jason Gunthorpe <jgunthorpe@...idianresearch.com>:
> On Tue, May 30, 2017 at 05:05:20PM -0500, Gustavo A. R. Silva wrote:
>> NULL check at line 376: if (!chip) {, implies chip might be NULL.
>> Function dev_get_drvdata() dereference pointer chip.
>> Move pointer tmp_dev assignment after the NULL check.
>
> chip cannot be null in st33zp24_send, please remove the bogus if
> instead.
>
I get it.
Thanks for clarifying.
--
Gustavo A. R. Silva
Powered by blists - more mailing lists