From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Roderick Colenbrander <roderick@gaikai.com>
Cc: linux-input@vger.kernel.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Jiri Kosina <jikos@kernel.org>, Simon Wood <simon@mungewell.org>,
Frank Praznik <frank.praznik@gmail.com>,
Tim Bird <tim.bird@am.sony.com>,
Roderick Colenbrander <roderick.colenbrander@sony.com>
Subject: Re: [PATCH v2] HID: sony: Fix input device leak when connecting a DS4 twice using USB/BT
Date: Wed, 1 Mar 2017 18:18:57 +0100 [thread overview]
Message-ID: <20170301171857.GK7064@mail.corp.redhat.com> (raw)
In-Reply-To: <20170225001415.21361-2-roderick@gaikai.com>
On Feb 24 2017 or thereabouts, Roderick Colenbrander wrote:
> From: Roderick Colenbrander <roderick.colenbrander@sony.com>
>
> When a user connects a DS4 twice using USB and BT, we reject the
> second device connection after the setup work. We then perform
> a cleanup, but during cleanup we are not removing the touchpad
> device. This leads to leakage of an input device, which we would
> never remove. It can likely result into a kernel oops as well
> when the touchpad evdev node is accessed and the underlaying HID
> device has been removed from the system.
>
> Fixes: ac797b95f532 ("HID: sony: Make the DS4 touchpad a separate device")
> Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
> ---
Looks good to me:
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> drivers/hid/hid-sony.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
> index f405b07..740996f 100644
> --- a/drivers/hid/hid-sony.c
> +++ b/drivers/hid/hid-sony.c
> @@ -2632,6 +2632,8 @@ static int sony_input_configured(struct hid_device *hdev,
> sony_leds_remove(sc);
> if (sc->quirks & SONY_BATTERY_SUPPORT)
> sony_battery_remove(sc);
> + if (sc->touchpad)
> + sony_unregister_touchpad(sc);
> sony_cancel_work_sync(sc);
> kfree(sc->output_report_dmabuf);
> sony_remove_dev_list(sc);
> --
> 2.9.3
>
next prev parent reply other threads:[~2017-03-01 17:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-25 0:14 [PATCH v2] HID: sony: 4.10 fixes Roderick Colenbrander
2017-02-25 0:14 ` [PATCH v2] HID: sony: Fix input device leak when connecting a DS4 twice using USB/BT Roderick Colenbrander
2017-03-01 17:18 ` Benjamin Tissoires [this message]
2017-03-06 13:21 ` 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=20170301171857.GK7064@mail.corp.redhat.com \
--to=benjamin.tissoires@redhat.com \
--cc=dmitry.torokhov@gmail.com \
--cc=frank.praznik@gmail.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=roderick.colenbrander@sony.com \
--cc=roderick@gaikai.com \
--cc=simon@mungewell.org \
--cc=tim.bird@am.sony.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 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).