All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] net: stmmac: sanitise stmmac_is_jumbo_frm()
@ 2025-11-18 10:00 Russell King (Oracle)
  2025-11-18 10:01 ` [PATCH net-next 1/2] net: stmmac: stmmac_is_jumbo_frm() len should be unsigned Russell King (Oracle)
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Russell King (Oracle) @ 2025-11-18 10:00 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: Alexandre Torgue, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, linux-arm-kernel, linux-stm32, Maxime Coquelin,
	netdev, Paolo Abeni

stmmac_is_jumbo_frm() takes skb->len, which is unsigned int, but the
parameter is passed as an "int" and then tested using signed
comparisons. This can cause bugs. Change the parameter to be unsigned.

Also arrange for it to return a bool.

 drivers/net/ethernet/stmicro/stmmac/chain_mode.c  | 9 ++++-----
 drivers/net/ethernet/stmicro/stmmac/hwif.h        | 2 +-
 drivers/net/ethernet/stmicro/stmmac/ring_mode.c   | 9 ++-------
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++---
 4 files changed, 10 insertions(+), 16 deletions(-)

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-11-19 16:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-18 10:00 [PATCH net-next 0/2] net: stmmac: sanitise stmmac_is_jumbo_frm() Russell King (Oracle)
2025-11-18 10:01 ` [PATCH net-next 1/2] net: stmmac: stmmac_is_jumbo_frm() len should be unsigned Russell King (Oracle)
2025-11-18 13:59   ` Maxime Chevallier
2025-11-18 10:01 ` [PATCH net-next 2/2] net: stmmac: stmmac_is_jumbo_frm() returns boolean Russell King (Oracle)
2025-11-18 14:00   ` Maxime Chevallier
2025-11-19 16:40 ` [PATCH net-next 0/2] net: stmmac: sanitise stmmac_is_jumbo_frm() patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.