All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Parkin <tparkin@katalix.com>
To: netdev@vger.kernel.org
Cc: Tom Parkin <tparkin@katalix.com>, James Chapman <jchapman@katalix.com>
Subject: [PATCH 09/12] l2tp: purge session reorder queue on delete
Date: Tue, 19 Mar 2013 16:11:20 +0000	[thread overview]
Message-ID: <1363709483-24021-10-git-send-email-tparkin@katalix.com> (raw)
In-Reply-To: <1363709483-24021-1-git-send-email-tparkin@katalix.com>

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 <tparkin@katalix.com>
Signed-off-by: James Chapman <jchapman@katalix.com>
---
 net/l2tp/l2tp_core.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
index 69c316d..c00f31b 100644
--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -1373,6 +1373,8 @@ again:
 				synchronize_rcu();
 			}
 
+			l2tp_session_queue_purge(session);
+
 			if (session->session_close != NULL)
 				(*session->session_close)(session);
 
@@ -1813,6 +1815,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);
 
-- 
1.7.9.5

  parent reply	other threads:[~2013-03-19 16:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-19 16:11 [PATCH 00/12] l2tp bugfix patchset Tom Parkin
2013-03-19 16:11 ` [PATCH 01/12] udp: add encap_destroy callback Tom Parkin
2013-03-19 16:11 ` [PATCH 02/12] l2tp: add udp encap socket destroy handler Tom Parkin
2013-03-19 16:11 ` [PATCH 03/12] l2tp: export l2tp_tunnel_closeall Tom Parkin
2013-03-19 16:11 ` [PATCH 04/12] l2tp: close sessions in ip socket destroy callback Tom Parkin
2013-03-19 16:11 ` [PATCH 05/12] l2tp: close sessions before initiating tunnel delete Tom Parkin
2013-03-19 16:11 ` [PATCH 06/12] l2tp: take a reference for kernel sockets in l2tp_tunnel_sock_lookup Tom Parkin
2013-03-19 16:11 ` [PATCH 07/12] l2tp: don't BUG_ON sk_socket being NULL Tom Parkin
2013-03-19 16:11 ` [PATCH 08/12] l2tp: add session reorder queue purge function to core Tom Parkin
2013-03-19 16:11 ` Tom Parkin [this message]
2013-03-19 16:11 ` [PATCH 10/12] l2tp: push all ppp pseudowire shutdown through .release handler Tom Parkin
2013-03-19 16:11 ` [PATCH 11/12] l2tp: avoid deadlock in l2tp stats update Tom Parkin
2013-03-19 16:11 ` [PATCH 12/12] l2tp: unhash l2tp sessions on delete, not on free Tom Parkin
2013-03-20 16:14 ` [PATCH 00/12] l2tp bugfix patchset David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1363709483-24021-10-git-send-email-tparkin@katalix.com \
    --to=tparkin@katalix.com \
    --cc=jchapman@katalix.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.