On Mon, Aug 24, 2026 at 12:37:09PM +0200, Lucas Poupeau wrote:
From: Lucas <redacted>
rtl8139_set_mac_address() accesses dev->dev_addr by casting it to u32
pointers. Besides potentially performing unaligned accesses, the second
read starts at offset 4 and reads 32 bits even though only two bytes
remain in the Ethernet address.
Use get_unaligned_le32() and get_unaligned_le16() to read the address
with the appropriate width and endianness. This also fixes the Sparse
type warnings caused by passing __le32 values to iowrite32().
Signed-off-by: Lucas Poupeau <redacted>
If you are targeting the net tree, you need a Fixes: tag.
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
Does this bother people?
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
Andrew
---
pw-bot: cr