Re: [PATCH 5/5] HID: sony_remove: manually unregister leds

From: Sven Eckelmann
Date: Thu Jan 26 2023 - 03:33:06 EST


On Thursday, 26 January 2023 01:24:57 CET Pietro Borrello wrote:
> Unregister the LED controller before device removal, as
> sony_led_set_brightness() may schedule sc->state_worker
> after the structure has been freed, causing a use-after-free.
>
> Fixes: 0a286ef27852 ("HID: sony: Add LED support for Sixaxis/Dualshock3 USB")
> Signed-off-by: Pietro Borrello <borrello@xxxxxxxxxxxxxxxx>
> ---
> drivers/hid/hid-sony.c | 8 ++++++++
> 1 file changed, 8 insertions(+)


Reviewed-by: Sven Eckelmann <sven@xxxxxxxxxxxxx>

Thanks,
Sven

Attachment: signature.asc
Description: This is a digitally signed message part.