1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-26 02:15:46 -05:00
linux/drivers/usb
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: <stable@vger.kernel.org> # 5.15
Reported-by: Michael Wu <michael@allwinnertech.com>
Tested-by: Michael Wu <michael@allwinnertech.com>
Reviewed-by: John Keeping <john@metanate.com>
Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
Link: https://lore.kernel.org/r/1654863478-26228-3-git-send-email-quic_linyyuan@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10 14:45:38 +02:00
..
atm
c67x00
cdns3 usb: cdnsp: Fixed setting last_trb incorrectly 2022-06-10 11:15:23 +02:00
chipidea
class
common
core
dwc2 usb: dwc2: Fix memory leak in dwc2_hcd_init 2022-06-10 11:12:20 +02:00
dwc3 USB: fixup for merge issue with "usb: dwc3: Don't switch OTG -> peripheral if extcon is present" 2022-06-10 11:19:42 +02:00
early
gadget usb: gadget: f_fs: change ep->ep safe in ffs_epfile_io() 2022-06-10 14:45:38 +02:00
host xhci: Fix null pointer dereference in resume if xhci has only one roothub 2022-06-10 13:57:20 +02:00
image
isp1760
misc
mon
mtu3
musb
phy Char / Misc / Other smaller driver subsystem updates for 5.19-rc1 2022-06-03 11:36:34 -07:00
renesas_usbhs
roles
serial USB: serial: option: add support for Cinterion MV31 with new baseline 2022-06-09 14:32:42 +02:00
storage
typec Char / Misc / Other smaller driver subsystem updates for 5.19-rc1 2022-06-03 11:36:34 -07:00
usbip
Kconfig
Makefile
usb-skeleton.c