Re: [PATCH v4 0/2] usb: gadget: f_fs: Prevent race between functionfs_unbind & ffs_ep0_queue_wait

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

 





On 12/15/2022 10:59 AM, Udipto Goswami wrote:
This series will prevent race between ep0_queue_wait &
functionfs_unbind. Currently, both routines are running
without any kind of serialization to make sure ep0req
doesn't get corrupted.

Changes in v4:
Split the implementation of v3 [1] into a series for better clarity.
Also, tested the patches by running USB plug-in/plug-out along with
composition switch.

Changes in v3:
Moved dequeue out of mutex to prevent deadlock.

Changes in v2:
Replaces spinlock with mutex & added dequeue operation in unbind.

[1]: https://patchwork.kernel.org/project/linux-usb/patch/20221125054119.25135-1-quic_ugoswami@xxxxxxxxxxx/

Udipto Goswami (2):
   usb: gadget: f_fs: Prevent race during ffs_ep0_queue_wait
   usb: gadget: f_fs: Ensure ep0req is dequeued before free_request

  drivers/usb/gadget/function/f_fs.c | 7 +++++++
  1 file changed, 7 insertions(+)


Series tested on SM8450.

Tested-by: Krishna Kurapati <quic_kriskura@xxxxxxxxxxx>

Thanks,
Krishna,



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux