Re: [PATCH] Input: db9 - enlarge the Saturn multitap packet buffer

From
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date
2026-11-04 23:46:43
Also in
lkml, stable
Reply to
Guanglei Zhu, 2026-11-03
On Tue, Nov 03, 2026 at 04:41:31PM +0800, Guanglei Zhu wrote:
The Saturn multitap path fills the packet buffer block by block:

	for (i = 0; i < 60; i += 10) {
		data[i] = db9_saturn_read_analog(port, type, powered);
		if (data[i] != 0xff)
			/* read each pad */
			for (j = 0; j < (data[i] & 0x0f); j++)
				data[i + j + 1] = db9_saturn_read_analog(port, type, powered);
	}

Each block is ten bytes apart, and the low nibble of the block
header - taken from the device - allows up to fifteen more bytes,
so the last block can write up to data[65]. The buffer, however,
is sixty bytes, and the six bytes past it belong to the rest of
the stack frame.

Give the buffer the size the protocol layout actually requires.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: <redacted>
Signed-off-by: Guanglei Zhu <redacted>
Applied, thank you.

-- 
Dmitry
Thread (32 messages) 32 messages, 3 authors, last reply 9d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help