From: Pietro Borrello <borrello@diag.uniroma1.it>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Jiri Kosina <jikos@kernel.org>, Hanno Zulla <kontakt@hanno.de>,
Pavel Machek <pavel@ucw.cz>, Lee Jones <lee@kernel.org>,
Roderick Colenbrander <roderick.colenbrander@sony.com>,
Sven Eckelmann <sven@narfation.org>,
linux-leds@vger.kernel.org,
Cristiano Giuffrida <c.giuffrida@vu.nl>,
"Bos, H.J." <h.j.bos@vu.nl>, Jakob Koschel <jkl820.git@gmail.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiri Kosina <jkosina@suse.cz>,
Roderick Colenbrander <roderick@gaikai.com>
Subject: Re: [PATCH v2 3/5] HID: dualsense_remove: manually unregister leds
Date: Thu, 9 Feb 2023 13:50:57 +0100 [thread overview]
Message-ID: <CAEih1qUU_aaHk7xFuyocgUq0pYLHemuRQiTboZDwyBTd7u2L5g@mail.gmail.com> (raw)
In-Reply-To: <20230209085940.53mrapggf6nagkdh@mail.corp.redhat.com>
On Thu, 9 Feb 2023 at 09:59, Benjamin Tissoires
<benjamin.tissoires@redhat.com> wrote:
>
> On Jan 31 2023, Pietro Borrello wrote:
> > Unregister the LED controllers before device removal, to prevent
> > unnecessary runs of dualsense_player_led_set_brightness().
> >
> > Fixes: 8c0ab553b072 ("HID: playstation: expose DualSense player LEDs through LED class.")
> > Signed-off-by: Pietro Borrello <borrello@diag.uniroma1.it>
> >
> > ---
> >
> > Contrary to the other patches in this series, failing to unregister
> > the led controller does not results into a use-after-free thanks
> > to the output_worker_initialized variable and the spinlock checks.
>
> And so we don't need that patch (nor for hid-sony.c) because we have a
> guard against scheduling a worker job when the device is being removed.
>
> So please drop 3,4,5 from this series, they are just making the code
> worse.
Sure.
I kept them only due to the Roderick Colenbrander's comment, but I'm happy
to remove them.
For reference:
> [...] I don't mind the change as it
> prevents the work scheduling functions to get called unnecessarily.
Link: https://lore.kernel.org/lkml/CAEc3jaCEKfqEJSV4=6GRj1Ry97xH+HwVSeEOZReNwkt=rLNvNQ@mail.gmail.com/
Thanks,
Pietro
next prev parent reply other threads:[~2023-02-09 12:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 13:08 [PATCH v2 0/5] HID: manually unregister leds on device removal to prevent UAFs Pietro Borrello
2023-01-31 13:08 ` [PATCH v2 1/5] HID: bigben_remove: manually unregister leds Pietro Borrello
2023-02-09 8:55 ` Benjamin Tissoires
2023-02-09 12:45 ` Pietro Borrello
2023-01-31 13:08 ` [PATCH v2 2/5] HID: asus_remove: manually unregister led Pietro Borrello
2023-01-31 13:08 ` [PATCH v2 3/5] HID: dualsense_remove: manually unregister leds Pietro Borrello
2023-02-09 8:59 ` Benjamin Tissoires
2023-02-09 12:50 ` Pietro Borrello [this message]
2023-01-31 13:08 ` [PATCH v2 4/5] HID: dualshock4_remove: " Pietro Borrello
2023-01-31 13:08 ` [PATCH v2 5/5] HID: sony_remove: " Pietro Borrello
2023-01-31 17:19 ` [PATCH v2 0/5] HID: manually unregister leds on device removal to prevent UAFs Lee Jones
[not found] <20230125-hid-unregister-leds-v2-0-514437b19297@diag.uniroma1.it>
2023-01-26 0:47 ` [PATCH 3/5] HID: dualsense_remove: manually unregister leds Roderick Colenbrander
2023-01-26 12:09 ` [PATCH v2 " Pietro Borrello
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=CAEih1qUU_aaHk7xFuyocgUq0pYLHemuRQiTboZDwyBTd7u2L5g@mail.gmail.com \
--to=borrello@diag.uniroma1.it \
--cc=benjamin.tissoires@redhat.com \
--cc=c.giuffrida@vu.nl \
--cc=h.j.bos@vu.nl \
--cc=jikos@kernel.org \
--cc=jkl820.git@gmail.com \
--cc=jkosina@suse.cz \
--cc=kontakt@hanno.de \
--cc=lee@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=roderick.colenbrander@sony.com \
--cc=roderick@gaikai.com \
--cc=sven@narfation.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).