[PATCH 5.10] Revert "USB: serial: keyspan_pda: fix information leak"
From: Fedor Pchelkin
Date: Sun Aug 30 2026 - 10:59:41 EST
This reverts commit cccef1711efbcdbe999738ac27d37b9ef6271abd which is
commit 6bfc8d01ac4068eced509f8fc74d0cd205e4dcec upstream.
The 5.10 backport is incorrect - instead of keyspan_pda_write_start() it
touches the wrong function keyspan_pda_write() which now returns an
incorrect number of buffered bytes.
It turns out that the proper fix for keyspan_pda_write_start() has been
already incorporated into the ported version of upstream commit
034e38e8f687 ("USB: serial: keyspan_pda: add write-fifo support"), for
unknown reason.
Other stable kernels, starting with 5.15, got proper backports.
Found by Linux Verification Center (linuxtesting.org) with Svace static
analysis tool.
Signed-off-by: Fedor Pchelkin <pchelkin@xxxxxxxxx>
---
drivers/usb/serial/keyspan_pda.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index 21dfd9bdc150..7141660d5d59 100644
--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -606,7 +606,7 @@ static int keyspan_pda_write(struct tty_struct *tty, struct usb_serial_port *por
if (rc)
return rc;
- return 0;
+ return count;
}
static void keyspan_pda_dtr_rts(struct usb_serial_port *port, int on)
--
2.55.0