Received: by 10.223.185.116 with SMTP id b49csp825887wrg; Sat, 10 Feb 2018 21:18:28 -0800 (PST) X-Google-Smtp-Source: AH8x224mYAHbkjyikGjNAO8AVUXzd5vtfw0lRXGAeHxN2wsSeNUEaR5j6O8Vbgf21HM24ovuEmea X-Received: by 2002:a17:902:e2:: with SMTP id a89-v6mr7189080pla.98.1518326308779; Sat, 10 Feb 2018 21:18:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518326308; cv=none; d=google.com; s=arc-20160816; b=fr+IIXF21npmnxWzNCU3cmlr58Tiy5nGw1Vodp5/1dXNB7qHGaQNxveJOOE7Ib7Q5N cBVqHpy1eLZIb7NDI/urJOyPii51Buvo6lE8NklqeUlsg2x6qOMtpVNmoPS5udB72aiz 6wd2/XJ88Rb2aWI+jHoQzFW5xdz4esiVfc9jxLsWsp7C6DsIM5AcfjxwcGdD54bMz4d3 nXiAGBrBDKONW6iw4H1aAjxnHLz7IeKfvnABmAZl7kC1L8OOQ/lAkRxqVUYzWs+CiM/K 67hDA0UHF1+COyrFtJifyDrR2SqV9ISolw0R0dYxXUYS4Fxf/sKhl5YsF7dwnwTYujX9 TZHw== 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=NuPQ9U6v7FK13n6rGuEe0Mf/Dx5VUgymvRqThnUS7oU=; b=N2NxNLLNSjv1u1IL6/vX6pJ6GUWUKGmD1Qk/ezv6mc6gO5TFeSy0FN0BDKVfIked4n qRCJwRvqrUYbaaKGbzQvR4CplB/u0BHFlFEQ3iebD99MaUVCjlx5RRsi0AerO7SaeFIU iie5nOO7CSI97u622Eqowg54GLWKySvga+3s8yYI53VulGe5wLxFcUVmvAbcVuzsusM6 AZVBiUc1y5uS1G+WFZ/tyUF68iHxf6VmzxgnNd/591YT2DJsoQSRnMSc5KZzQhdFVyyW /2E4gjScuYuX1X55RMQyRUu7CDVMD7kPnSX1jl3QxiJAz3zGWLNj8fPIIiJpmdg3F4DF 3PWQ== 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 z78si4337250pfk.374.2018.02.10.21.18.14; Sat, 10 Feb 2018 21:18:28 -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 S932125AbeBKFRn (ORCPT + 99 others); Sun, 11 Feb 2018 00:17:43 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:41347 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752547AbeBKEdk (ORCPT ); Sat, 10 Feb 2018 23:33:40 -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 1ekjKc-0002hP-R1; Sun, 11 Feb 2018 04:33:38 +0000 Received: from ben by deadeye with local (Exim 4.90) (envelope-from ) id 1ekjKX-0004Sd-CS; Sun, 11 Feb 2018 04:33:33 +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, "David S. Miller" , "James Chapman" , "Tom Parkin" Date: Sun, 11 Feb 2018 04:20:06 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.2 15/79] l2tp: purge session reorder queue on delete 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.2.99-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Tom Parkin commit 4c6e2fd35460208596fa099ee0750a4b0438aa5c upstream. Add calls to l2tp_session_queue_purge as a part of l2tp_tunnel_closeall and l2tp_session_delete. Pseudowire implementations which are deleted only via. l2tp_core l2tp_session_delete calls can dispense with their own code for flushing the reorder queue. Signed-off-by: Tom Parkin Signed-off-by: James Chapman Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- net/l2tp/l2tp_core.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/net/l2tp/l2tp_core.c +++ b/net/l2tp/l2tp_core.c @@ -1347,6 +1347,8 @@ again: synchronize_rcu(); } + l2tp_session_queue_purge(session); + if (session->session_close != NULL) (*session->session_close)(session); @@ -1669,6 +1671,8 @@ EXPORT_SYMBOL_GPL(l2tp_session_free); */ int l2tp_session_delete(struct l2tp_session *session) { + l2tp_session_queue_purge(session); + if (session->session_close != NULL) (*session->session_close)(session);