diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2025-11-26 17:43:11 -0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-11-27 17:44:22 -0800 |
| commit | 4c03592689bc19df9deda7a33d56c6ac0cec8651 (patch) | |
| tree | dd47548febb623031855408cf7174326fdf9615a | |
| parent | 362a161b2582f8d6a34b3b0940f8323adc2f292f (diff) | |
net: restore napi_consume_skb()'s NULL-handling
Commit e20dfbad8aab ("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>
| -rw-r--r-- | net/core/skbuff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 5a1d123e7ef7..a00808f7be6a 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -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; } |