]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: bcmgenet: Add a check for oversized packets
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 27 Jan 2023 00:08:19 +0000 (16:08 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 15:26:42 +0000 (16:26 +0100)
commit7cdb07e10c1258c08f31b24898930e4ece88d163
tree274d576855f0674eaa4a8e55ef730454d05e817d
parent9566b965ee2931f07746393b3fb1dce62d658c21
net: bcmgenet: Add a check for oversized packets

[ Upstream commit 5c0862c2c962052ed5055220a00ac1cefb92fbcd ]

Occasionnaly we may get oversized packets from the hardware which
exceed the nomimal 2KiB buffer size we allocate SKBs with. Add an early
check which drops the packet to avoid invoking skb_over_panic() and move
on to processing the next packet.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/broadcom/genet/bcmgenet.c