public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfrm: init skb_head lock for transport-mode packets
@ 2018-01-04 10:36 Artem Savkov
  2018-01-04 11:01 ` Herbert Xu
  0 siblings, 1 reply; 5+ messages in thread
From: Artem Savkov @ 2018-01-04 10:36 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Steffen Klassert, netdev, linux-kernel, Artem Savkov

Commit acf568ee859f "xfrm: Reinject transport-mode packets through tasklet"
adds an sk_buff_head queue, but never initializes trans->queue.lock, which
results in a "spinlock bad magic" BUG on skb_queue_tail() call in
xfrm_trans_queue.
Use skb_queue_head_init() instead of __skb_queue_head_init() to properly
initialize said lock.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
---
 net/xfrm/xfrm_input.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
index 26b10eb7a206..d5389b9dbbb9 100644
--- a/net/xfrm/xfrm_input.c
+++ b/net/xfrm/xfrm_input.c
@@ -542,7 +542,7 @@ void __init xfrm_input_init(void)
 		struct xfrm_trans_tasklet *trans;
 
 		trans = &per_cpu(xfrm_trans_tasklet, i);
-		__skb_queue_head_init(&trans->queue);
+		skb_queue_head_init(&trans->queue);
 		tasklet_init(&trans->tasklet, xfrm_trans_reinject,
 			     (unsigned long)trans);
 	}
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-01-05 10:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-04 10:36 [PATCH] xfrm: init skb_head lock for transport-mode packets Artem Savkov
2018-01-04 11:01 ` Herbert Xu
2018-01-04 11:20   ` Artem Savkov
2018-01-04 11:25     ` [PATCH v2] xfrm: Use __skb_queue_tail in xfrm_trans_queue Herbert Xu
2018-01-05 10:31       ` Steffen Klassert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox