Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752833AbeADLZP (ORCPT + 1 other); Thu, 4 Jan 2018 06:25:15 -0500 Received: from [128.1.224.119] ([128.1.224.119]:49860 "EHLO ringil.hmeau.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752159AbeADLZO (ORCPT ); Thu, 4 Jan 2018 06:25:14 -0500 Date: Thu, 4 Jan 2018 22:25:07 +1100 From: Herbert Xu To: Artem Savkov Cc: Steffen Klassert , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] xfrm: Use __skb_queue_tail in xfrm_trans_queue Message-ID: <20180104112507.GB6437@gondor.apana.org.au> References: <20180104103628.9461-1-asavkov@redhat.com> <20180104110132.GA6256@gondor.apana.org.au> <20180104112026.436rgqaeokcden4r@shodan.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180104112026.436rgqaeokcden4r@shodan.usersys.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Jan 04, 2018 at 12:20:26PM +0100, Artem Savkov wrote: > Right, thats a better solution. > > Reported-and-tested-by: Artem Savkov Thanks! But I just realised that this patch is based on my dirty tree. So here is a rebased version: ---8<--- We do not need locking in xfrm_trans_queue because it is designed to use per-CPU buffers. However, the original code incorrectly used skb_queue_tail which takes the lock. This patch switches it to __skb_queue_tail instead. Reported-and-tested-by: Artem Savkov Fixes: acf568ee859f ("xfrm: Reinject transport-mode packets...") Signed-off-by: Herbert Xu diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index 444fa37..9dbf425 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c @@ -508,7 +508,7 @@ int xfrm_trans_queue(struct sk_buff *skb, return -ENOBUFS; XFRM_TRANS_SKB_CB(skb)->finish = finish; - skb_queue_tail(&trans->queue, skb); + __skb_queue_tail(&trans->queue, skb); tasklet_schedule(&trans->tasklet); return 0; } -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt