Re: [PATCH] HID: nintendo: fix rumble worker null pointer deref

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Daniel J. Ogorchock" <djogorchock@xxxxxxxxx> wrote:
> We can dereference a null pointer trying to queue work to a destroyed
> workqueue.
> 
> If the device is disconnected, nintendo_hid_remove is called, in which
> the rumble_queue is destroyed. Avoid using that queue to defer rumble
> work once the controller state is set to JOYCON_CTLR_STATE_REMOVED.
> 
> This eliminates the null pointer dereference.
> 
> Signed-off-by: Daniel J. Ogorchock <djogorchock@xxxxxxxxx>
> ---
>  drivers/hid/hid-nintendo.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Reviewed-by: Silvan Jegen <s.jegen@xxxxxxxxx>


Cheers,

Silvan



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux