Received: by 10.223.185.116 with SMTP id b49csp6395679wrg; Wed, 28 Feb 2018 08:42:57 -0800 (PST) X-Google-Smtp-Source: AH8x227Q8Z5D7QgR8PLxA6zG8DmKoNPru3T6CE+JF73uTVaEjf/Is9bw5t6AA0+liEVPPs6eYx0Q X-Received: by 10.101.78.143 with SMTP id b15mr14860425pgs.229.1519836177159; Wed, 28 Feb 2018 08:42:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519836177; cv=none; d=google.com; s=arc-20160816; b=bB7ril/N5LktWArMjZZyLOXtZxeoXNmlaW8hnQtnrMa+aHa2VF8dhmWSvyjakOmuyr ubR8K/wHr/wfrQOCZTANKg2nASw/CEvb6C36SwDF2Hwni7C/b0RoUryIfqXgg1igDJaB DKHy8EhaRHzwujsAtAy9p8pYQFr+xVN1MXUEsUx08F0X36IL0DHD6UZ0g2FftblnxxdT mQg8o3QNMpoipOEr4RckxpE85HfxqP5Q5YY7Qg/UJzsT4gEn36C7mzy5EK8TpDHJJQki j6ujZu50x/O15i32Ae7m5ExSKXFMrxd1yBoq1YUlsc90VCVRLGhodIbRCho3wWswYL94 ePtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=6E0zGBdpyIny4BbpB4JksrfZVgzVzL2Bks9WUn0QjEk=; b=i6bAPHmewtjXQ/ZQEmia5OxvKhoCphM35b63qpL3TLOEQVIw1ARFl3gw7n7QBZAO1S Vn1h6yEPGH6yUVeNNZaggYLvtcbpPOAy3PXZVXlA/S1WvQ0WjPhj7Fpm2THcOxEDc90E LtYrZTZi10yLaaG3voWolzywdqmEiZ++9DGnIr8jv/2K5r/UnH0R+kqnlaIDYBAGsjiD 51c6Itszgcs7rnYJ3VpOSBy980ad7QueaodbeNneSRwz8pVHU8wZ89akR3DEM+kP46QQ EUKl/bXkMrWq5N+bvr+oyK70ypDpbO4lAB8YgqqRaQ0uKUBoUYajdcXpOrbSoc+8AIO2 x4/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d13si1207713pgn.366.2018.02.28.08.42.41; Wed, 28 Feb 2018 08:42:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932944AbeB1QDY (ORCPT + 99 others); Wed, 28 Feb 2018 11:03:24 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34756 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932699AbeB1QDT (ORCPT ); Wed, 28 Feb 2018 11:03:19 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yj-0006Xd-Lk; Wed, 28 Feb 2018 15:22:22 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yi-0000CE-Km; Wed, 28 Feb 2018 15:22:20 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Steffen Klassert" , "Herbert Xu" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 172/254] xfrm: Use __skb_queue_tail in xfrm_trans_queue In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Herbert Xu commit d16b46e4fd8bc6063624605f25b8c0835bb1fbe3 upstream. 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 Signed-off-by: Steffen Klassert Signed-off-by: Ben Hutchings --- net/xfrm/xfrm_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c @@ -414,7 +414,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; }