Skip to content

usbip: Fix infinite loop in vhci rx

Suwan Kim linux-usb lkml stable 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesIn review
  2. v12 patches 4 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2usbip: Fix receive error in vhci-hcd when using scatter-gatherdrivers/usb/usbip/usbip_common.c+3 -01 reply
2/2usbip: Fix error path of vhci_recv_ret_submit()drivers/usb/usbip/vhci_rx.c+9 -41 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMarek Marczykowski-GóreckiShuah Khan
1/2T-b A-b
2/2T-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] usbip: Fix infinite loop in vhci rx

https://lore.kernel.org/linux-usb/20191206032406.GE1208@mail-itl/T/#u
In this mail thread, it shows system hang when there is receive error in vhci. There are two different causes in this bug.

[1] Wrong receive logic in vhci when using scatter-gather
[2] Wrong error path of vhci_recv_ret_submit()

[1] considers normal reception to be an error condition and closes connection. And when [1] error situation occurs, wrong error path[2] causes the system freeze. So each patch fixes this bugs.

---
Change log

Patch [1] - Add Tested-by tag
Patch [2] - Add Tested-by tag
- Fix typo
- Fix error code in urb->status (-EPIPE->-EPROTO)

Suwan Kim (2):
usbip: Fix receive error in vhci-hcd when using scatter-gather
usbip: Fix error path of vhci_recv_ret_submit()

 drivers/usb/usbip/usbip_common.c |  3 +++
 drivers/usb/usbip/vhci_rx.c      | 13 +++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)
Signature · 1 line
2.20.1