summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorYunsheng Lin <linyunsheng@huawei.com>2020-11-24 18:49:29 +0800
committerJakub Kicinski <kuba@kernel.org>2020-11-25 15:08:38 -0800
commit6454eca81eae5fd046906ea9af3afc019a9639b0 (patch)
tree7e7ba80fe4b8140a2871e460c39ec9d01a6e6299 /net/core
parent8b5536ad1216c47fb9b37ef2cd0cfa70d79d4645 (diff)
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>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/skbuff.c2
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;