diff mbox series

[net-next,v3,2/2] net: Use lockdep_assert_in_softirq() in napi_consume_skb()

Message ID 1606214969-97849-3-git-send-email-linyunsheng@huawei.com
State New
Headers show
Series None | expand

Commit Message

Yunsheng Lin Nov. 24, 2020, 10:49 a.m. UTC
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>
---
 net/core/skbuff.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index ffe3dcc..effa19d 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;