Re: [PATCH net 1/2] net: dsa: mxl862xx: avoid unaligned 16-bit access in api_wrap

From: patchwork-bot+netdevbpf

Date: Wed Jun 24 2026 - 21:09:13 EST


Hello:

This series was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Fri, 19 Jun 2026 04:39:25 +0100 you wrote:
> The MXL862XX_API_* macros pass the address of a stack-allocated, __packed
> firmware-ABI struct to mxl862xx_api_wrap() as a void *. The struct has an
> alignment of 1, so the compiler is free to place it at an odd address.
>
> mxl862xx_api_wrap() reinterprets that buffer as a __le16 * and accesses it
> with data[i], for which the compiler assumes the natural 2-byte alignment
> of __le16 and emits aligned 16-bit loads/stores (e.g. lhu/sh on MIPS).
> When the buffer lands on an odd address these fault on architectures that
> do not support unaligned access, such as MIPS32.
>
> [...]

Here is the summary with links:
- [net,1/2] net: dsa: mxl862xx: avoid unaligned 16-bit access in api_wrap
https://git.kernel.org/netdev/net/c/6b3f7af57881
- [net,2/2] net: dsa: mxl862xx: fix use-after-free of DSA ports in crc_err_work
https://git.kernel.org/netdev/net/c/bcb3b8314611

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html