All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Kosina <jikos@kernel.org>
To: Jason Gerecke <killertofu@gmail.com>
Cc: linux-input@vger.kernel.org,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Ping Cheng <pinglinux@gmail.com>, Aaron Skomra <skomra@gmail.com>,
	Jason Gerecke <jason.gerecke@wacom.com>
Subject: Re: [PATCH] HID: wacom: Have wacom_tpc_irq guard against possible NULL dereference
Date: Fri, 5 May 2017 14:53:27 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LSU.2.20.1705051452580.26873@cbobk.fhfr.pm> (raw)
In-Reply-To: <20170425182956.15406-1-killertofu@gmail.com>

On Tue, 25 Apr 2017, Jason Gerecke wrote:

> The following Smatch complaint was generated in response to commit
> 2a6cdbd ("HID: wacom: Introduce new 'touch_input' device"):
> 
>     drivers/hid/wacom_wac.c:1586 wacom_tpc_irq()
>              error: we previously assumed 'wacom->touch_input' could be null (see line 1577)
> 
> The 'touch_input' and 'pen_input' variables point to the 'struct input_dev'
> used for relaying touch and pen events to userspace, respectively. If a
> device does not have a touch interface or pen interface, the associated
> input variable is NULL. The 'wacom_tpc_irq()' function is responsible for
> forwarding input reports to a more-specific IRQ handler function. An
> unknown report could theoretically be mistaken as e.g. a touch report
> on a device which does not have a touch interface. This can be prevented
> by only calling the pen/touch functions are called when the pen/touch
> pointers are valid.
> 
> Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>

Applied to for-4.12/upstream-fixes branch with these tags:

    Fixes: 2a6cdbd ("HID: wacom: Introduce new 'touch_input' device")
    Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
    Reviewed-by: Ping Cheng <ping.cheng@wacom.com>
    Cc: stable@vger.kernel.org

-- 
Jiri Kosina
SUSE Labs


      parent reply	other threads:[~2017-05-05 12:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-12 20:31 [bug report] HID: wacom: Introduce new 'touch_input' device Dan Carpenter
2017-04-25 18:29 ` [PATCH] HID: wacom: Have wacom_tpc_irq guard against possible NULL dereference Jason Gerecke
2017-04-25 20:56   ` Ping Cheng
2017-05-02 21:04     ` Jason Gerecke
2017-05-03  9:26       ` Jiri Kosina
2017-05-05 12:53   ` Jiri Kosina [this message]

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=alpine.LSU.2.20.1705051452580.26873@cbobk.fhfr.pm \
    --to=jikos@kernel.org \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jason.gerecke@wacom.com \
    --cc=killertofu@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=pinglinux@gmail.com \
    --cc=skomra@gmail.com \
    /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.