linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Andrew Duggan <aduggan@synaptics.com>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Federico Cerutti <federico@ceres-c.it>,
	Christopher Heiny <Cheiny@synaptics.com>
Subject: Re: [PATCH] Input: synaptics-rmi4 - validate that the rmi_dev pointer is set before dereferencing it
Date: Mon, 28 Oct 2019 21:19:47 -0700	[thread overview]
Message-ID: <20191029041947.GG57214@dtor-ws> (raw)
In-Reply-To: <20191023012344.20998-2-aduggan@synaptics.com>

Hi Andrew,

On Wed, Oct 23, 2019 at 01:24:05AM +0000, Andrew Duggan wrote:
> A bug in hid-rmi was causing rmi_unregister_transport_device() to be
> called even if the call to rmi_register_transport_device() failed to
> allocate the rmi device. A patch has been submitted to fix the issue in
> hid-rmi. This patch will ensure that should a simialr situation
> occur then the rmi driver will not dereference a NULL pointer.

This looks like "garbage in, garbage out" problem where we should not be
calling unregister in the first place. I'd rather not apply this.

Thanks.

-- 
Dmitry

  reply	other threads:[~2019-10-29  4:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-23  1:24 [PATCH] HID: rmi: Check that the RMI_STARTED bit is set before unregistering the RMI transport device Andrew Duggan
2019-10-23  1:24 ` [PATCH] Input: synaptics-rmi4 - validate that the rmi_dev pointer is set before dereferencing it Andrew Duggan
2019-10-29  4:19   ` Dmitry Torokhov [this message]
2019-10-29 18:40     ` Andrew Duggan
2019-11-15 15:26 ` [PATCH] HID: rmi: Check that the RMI_STARTED bit is set before unregistering the RMI transport device Jiri Kosina
2019-11-15 18:18   ` Andrew Duggan
2019-11-18  9:24     ` Jiri Kosina

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=20191029041947.GG57214@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=Cheiny@synaptics.com \
    --cc=aduggan@synaptics.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=federico@ceres-c.it \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).