Re: [PATCH] thunderbolt: debugfs: fix sideband write size check
From: Mika Westerberg
Date: Mon Jun 08 2026 - 06:53:34 EST
On Mon, Jun 08, 2026 at 02:31:47PM +0800, raoxu wrote:
> From: Xu Rao <raoxu@xxxxxxxxxxxxx>
>
> sb_regs_write() looks up the matching sideband register entry before
> validating the number of bytes to write.
>
> However, the size check uses sb_regs->size, which is the size of the
> first entry in the register table, instead of the matched entry. This
> rejects valid writes to larger sideband registers such as USB4_SB_DEBUG
> or USB4_SB_DATA.
>
> Use the matched register entry for the size check.
>
> Signed-off-by: Xu Rao <raoxu@xxxxxxxxxxxxx>
Applied to thunderbolt.git/next, thanks!