Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1653693

Re: [PATCH] char: tpm: fix potential null pointer dereference

From "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Newsgroups linux.kernel
Subject Re: [PATCH] char: tpm: fix potential null pointer dereference
Date 2017-05-31 00:50 +0200
Message-ID <tMY7D-4OE-3@gated-at.bofh.it> (permalink)
References <tMXEC-4Ei-13@gated-at.bofh.it> <tMXOi-4I0-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Jason,

Quoting Jason Gunthorpe <jgunthorpe@obsidianresearch.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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] char: tpm: fix potential null pointer dereference "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-05-31 00:20 +0200
  Re: [PATCH] char: tpm: fix potential null pointer dereference Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2017-05-31 00:30 +0200
    Re: [PATCH] char: tpm: fix potential null pointer dereference "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-05-31 00:50 +0200
      [PATCH] char: tpm: remove unnecessary code "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-05-31 02:10 +0200

csiph-web