Skip to content

Commit

Permalink
net: Use lockdep_assert_in_softirq() in napi_consume_skb()
Browse files Browse the repository at this point in the history
Use napi_consume_skb() to assert the case when it is not called
in a atomic softirq context.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Yunsheng Lin authored and kuba-moo committed Nov 25, 2020
1 parent 8b5536a commit 6454eca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,8 @@ void napi_consume_skb(struct sk_buff *skb, int budget)
return;
}

lockdep_assert_in_softirq();

if (!skb_unref(skb))
return;

Expand Down

0 comments on commit 6454eca

Please sign in to comment.