Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752752AbeADKgm (ORCPT + 1 other); Thu, 4 Jan 2018 05:36:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34105 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752159AbeADKgk (ORCPT ); Thu, 4 Jan 2018 05:36:40 -0500 From: Artem Savkov To: Herbert Xu Cc: Steffen Klassert , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Artem Savkov Subject: [PATCH] xfrm: init skb_head lock for transport-mode packets Date: Thu, 4 Jan 2018 11:36:28 +0100 Message-Id: <20180104103628.9461-1-asavkov@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 04 Jan 2018 10:36:40 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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 --- 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