diff options
| author | 2020-11-24 18:49:29 +0800 | |
|---|---|---|
| committer | 2020-11-25 15:08:38 -0800 | |
| commit | 6454eca81eae5fd046906ea9af3afc019a9639b0 (patch) | |
| tree | 7e7ba80fe4b8140a2871e460c39ec9d01a6e6299 | |
| parent | lockdep: Introduce in_softirq lockdep assert (diff) | |
| download | linux-dev-6454eca81eae5fd046906ea9af3afc019a9639b0.tar.xz linux-dev-6454eca81eae5fd046906ea9af3afc019a9639b0.zip | |
net: Use lockdep_assert_in_softirq() in napi_consume_skb()
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>
| -rw-r--r-- | net/core/skbuff.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index ffe3dcc0ebea..effa19da8681 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -902,6 +902,8 @@ void napi_consume_skb(struct sk_buff *skb, int budget) return; } + lockdep_assert_in_softirq(); + if (!skb_unref(skb)) return; |
