mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
net: restore napi_consume_skb()'s NULL-handling
Commit e20dfbad8a ("net: fix napi_consume_skb() with alien skbs")
added a skb->cpu check to napi_consume_skb(), before the point where
napi_consume_skb() validated skb is not NULL.
Add an explicit check to the early exit condition.
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -1490,7 +1490,7 @@ void napi_skb_free_stolen_head(struct sk_buff *skb)
|
||||
void napi_consume_skb(struct sk_buff *skb, int budget)
|
||||
{
|
||||
/* Zero budget indicate non-NAPI context called us, like netpoll */
|
||||
if (unlikely(!budget)) {
|
||||
if (unlikely(!budget || !skb)) {
|
||||
dev_consume_skb_any(skb);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user