stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "ppp: fix pppoe_dev deletion condition in pppoe_release()" has been added to the 4.1-stable tree
@ 2015-11-17 22:39 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-11-17 22:39 UTC (permalink / raw)
  To: g.nault, davem, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    ppp: fix pppoe_dev deletion condition in pppoe_release()

to the 4.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ppp-fix-pppoe_dev-deletion-condition-in-pppoe_release.patch
and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Tue Nov 17 14:35:45 PST 2015
From: Guillaume Nault <g.nault@alphalink.fr>
Date: Thu, 22 Oct 2015 16:57:10 +0200
Subject: ppp: fix pppoe_dev deletion condition in pppoe_release()

From: Guillaume Nault <g.nault@alphalink.fr>

[ Upstream commit 1acea4f6ce1b1c0941438aca75dd2e5c6b09db60 ]

We can't rely on PPPOX_ZOMBIE to decide whether to clear po->pppoe_dev.
PPPOX_ZOMBIE can be set by pppoe_disc_rcv() even when po->pppoe_dev is
NULL. So we have no guarantee that (sk->sk_state & PPPOX_ZOMBIE) implies
(po->pppoe_dev != NULL).
Since we're releasing a PPPoE socket, we want to release the pppoe_dev
if it exists and reset sk_state to PPPOX_DEAD, no matter the previous
value of sk_state. So we can just check for po->pppoe_dev and avoid any
assumption on sk->sk_state.

Fixes: 2b018d57ff18 ("pppoe: drop PPPOX_ZOMBIEs in pppoe_release")
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ppp/pppoe.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/ppp/pppoe.c
+++ b/drivers/net/ppp/pppoe.c
@@ -589,7 +589,7 @@ static int pppoe_release(struct socket *
 
 	po = pppox_sk(sk);
 
-	if (sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND | PPPOX_ZOMBIE)) {
+	if (po->pppoe_dev) {
 		dev_put(po->pppoe_dev);
 		po->pppoe_dev = NULL;
 	}


Patches currently in stable-queue which might be from g.nault@alphalink.fr are

queue-4.1/ppp-fix-pppoe_dev-deletion-condition-in-pppoe_release.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-17 22:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-17 22:39 Patch "ppp: fix pppoe_dev deletion condition in pppoe_release()" has been added to the 4.1-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).