All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Shaobo <shaobo@cs.utah.edu>
Cc: linux-input@vger.kernel.org
Subject: Re: Help with confirming an error trace in drivers/input/touchscreen/ad7879-spi.c
Date: Thu, 16 Feb 2017 15:31:36 -0800	[thread overview]
Message-ID: <20170216233136.GA6708@dtor-ws> (raw)
In-Reply-To: <7a8799eb4ddca5b4b52991158f8ddc87@cs.utah.edu>

Hi Shaobo,

On Thu, Feb 16, 2017 at 04:27:00PM -0700, Shaobo wrote:
> Hi there,
> 
> My name is Shaobo He and I am a graduate student at University of
> Utah. I am applying a static analysis tool to the Linux device
> drivers and got an error trace of null pointer dereference in
> drivers/input/touchscreen/ad7879-spi.c staring from
> `ad7879_spi_multi_read`: it calls `ad7879_spi_xfer` with the
> argument `tx_buf` being NULL, which gets dereferenced at line 52
> given the argument `count` being 1. As you can see, the error trace
> is only plausible since it depends on certain conditions. To be more
> specific, is it possible for the count argument to be 1. Therefore,
> I was wondering if you could help me confirm it since you are one of
> the authors of this driver.
> 
> Thanks for your time. I am looking forward to your reply.

We never call ad7879_spi_multi_read() with count == 1, so this scenario
is not going to happen. Given that this is driiver-private code and not
a public API I think it is OK-ish.

Thanks.

-- 
Dmitry

  reply	other threads:[~2017-02-16 23:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16 23:27 Help with confirming an error trace in drivers/input/touchscreen/ad7879-spi.c Shaobo
2017-02-16 23:31 ` Dmitry Torokhov [this message]
2017-02-17  3:25   ` Shaobo
2017-02-28 18:55     ` 'Dmitry Torokhov'
  -- strict thread matches above, loose matches on Subject: below --
2017-02-16 23:16 Shaobo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170216233136.GA6708@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=shaobo@cs.utah.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.