aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorElson Roy Serrao <[email protected]>2023-06-01 21:27:30 +0000
committerGreg Kroah-Hartman <[email protected]>2023-06-13 09:52:20 +0000
commit00f8205ffcf112dcef14f8151d78075d38d22c08 (patch)
treeac01ae08e1b168db367d5e522344ef0fe777ea4a /net/unix/af_unix.c
parentusb: gadget: udc: renesas_usb3: Fix RZ/V2M {modprobe,bind} error (diff)
downloadkernel-00f8205ffcf112dcef14f8151d78075d38d22c08.tar.gz
kernel-00f8205ffcf112dcef14f8151d78075d38d22c08.zip
usb: dwc3: gadget: Reset num TRBs before giving back the request
Consider a scenario where cable disconnect happens when there is an active usb reqest queued to the UDC. As part of the disconnect we would issue an end transfer with no interrupt-on-completion before giving back this request. Since we are giving back the request without skipping TRBs the num_trbs field of dwc3_request still holds the stale value previously used. Function drivers re-use same request for a given bind-unbind session and hence their dwc3_request context gets preserved across cable disconnect/connect. When such a request gets re-queued after cable connect, we would increase the num_trbs field on top of the previous stale value thus incorrectly representing the number of TRBs used. Fix this by resetting num_trbs field before giving back the request. Fixes: 09fe1f8d7e2f ("usb: dwc3: gadget: track number of TRBs per request") Cc: stable <[email protected]> Signed-off-by: Elson Roy Serrao <[email protected]> Acked-by: Thinh Nguyen <[email protected]> Message-ID: <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions