Commit f93e5540 authored by Florian Fainelli's avatar Florian Fainelli Committed by sanglipeng
Browse files

net: bcmgenet: Add a check for oversized packets

stable inclusion
from stable-v5.10.173
commit 841881320562cbeac7046b537b91cd000480cea2
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8BFR3

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=841881320562cbeac7046b537b91cd000480cea2



--------------------------------

[ Upstream commit 5c0862c2 ]

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: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent fd56b632
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment