Re: [PATCH] media: uvcvideo: Fix crash during unbind if gpio unit is in use
From: Sergey Senozhatsky
Date: Mon Nov 04 2024 - 05:09:53 EST
On (24/10/31 13:59), Ricardo Ribalda wrote:
> We used the wrong device for the device managed functions. We used the
> usb device, when we should be using the interface device.
>
> If we unbind the driver from the usb interface, the cleanup functions
> are never called. In our case, the IRQ is never disabled.
>
> If an IRQ is triggered, it will try to access memory sections that are
> already free, causing an OOPS.
>
> Luckily this bug has small impact, as it is only affected by devices
> with gpio units and the user has to unbind the device, a disconnect will
> not trigger this error.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: 2886477ff987 ("media: uvcvideo: Implement UVC_EXT_GPIO_UNIT")
> Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
FWIW,
Reviewed-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>