Re: [PATCH] Input: db9 - enlarge the Saturn multitap packet buffer
From: Dmitry Torokhov
Date: Wed Nov 04 2026 - 21:03:16 EST
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: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Guanglei Zhu <zhugl3@xxxxxxxxxxxx>
Applied, thank you.
--
Dmitry