Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH v3 0/3] USB: serial: kobil_sct: fix write path races
@ 2026-11-30 12:05 YuanZhe Liu
  2026-11-30 12:05 ` [PATCH v3 1/3] USB: serial: kobil_sct: fix URB submitted while active YuanZhe Liu
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: YuanZhe Liu @ 2026-11-30 12:05 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, stable, Bin Yu,
	Cheng Wen

This series fixes the write path of the KOBIL USB serial driver.

Patch 1 waits for each interrupt-out chunk to complete instead of reusing
the URB while it is still active, and stops sending on errors.

Patch 2 serializes concurrent writers so that the transmit buffer cannot
be corrupted and the URB cannot be resubmitted by a second caller.

Patch 3 moves the chunked block transmission to a work item so the tty
write path no longer sleeps and the port private data cannot be freed
while the driver is waiting on a transfer.

---
v3:
- Restart the interrupt-in URB only when the whole block was sent.
- Add a patch to serialize concurrent writes.
- Add a patch to move the block transmission to a work item.

v2:
- Check urb->status and stop sending the block when the transfer fails
  or the URB is killed.
- Only restart the interrupt-in URB once the block has been sent.
- Bail out if the port was disconnected while waiting.


YuanZhe Liu (3):
  USB: serial: kobil_sct: fix URB submitted while active
  USB: serial: kobil_sct: serialize concurrent writes
  USB: serial: kobil_sct: move block transmission to a work queue

 drivers/usb/serial/kobil_sct.c | 199 ++++++++++++++++++++++++++-------
 1 file changed, 161 insertions(+), 38 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-30 12:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 12:05 [PATCH v3 0/3] USB: serial: kobil_sct: fix write path races YuanZhe Liu
2026-11-30 12:05 ` [PATCH v3 1/3] USB: serial: kobil_sct: fix URB submitted while active YuanZhe Liu
2026-11-30 12:05 ` [PATCH v3 2/3] USB: serial: kobil_sct: serialize concurrent writes YuanZhe Liu
2026-11-30 12:05 ` [PATCH v3 3/3] USB: serial: kobil_sct: move block transmission to a work queue YuanZhe Liu
2026-11-30 12:17 ` [PATCH v3 0/3] USB: serial: kobil_sct: fix write path races Johan Hovold
2026-11-30 12:29   ` YuanZhe Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox