Files
linux/drivers/usb/gadget/function
Linyu Yuan 0698f0209d usb: gadget: f_fs: change ep->ep safe in ffs_epfile_io()
In ffs_epfile_io(), when read/write data in blocking mode, it will wait
the completion in interruptible mode, if task receive a signal, it will
terminate the wait, at same time, if function unbind occurs,
ffs_func_unbind() will kfree all eps, ffs_epfile_io() still try to
dequeue request by dereferencing ep which may become invalid.

Fix it by add ep spinlock and will not dereference ep if it is not valid.

Cc: <[email protected]> # 5.15
Reported-by: Michael Wu <[email protected]>
Tested-by: Michael Wu <[email protected]>
Reviewed-by: John Keeping <[email protected]>
Signed-off-by: Linyu Yuan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2022-06-10 14:45:38 +02:00
..
…
…
…
…
2022-02-14 09:04:36 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
2021-08-09 08:52:46 +02:00
…
2022-05-03 16:35:26 +02:00