Skip to contentSkip to conversation

Patch "ppp: fix pppoe_dev deletion condition in pppoe_release()" has been added to the 3.14-stable tree

PATCH [email protected] 1 participant 1 message Dec 6, 2015

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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 3.14-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-3.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Sat Dec 5 21:06:41 PST 2015

From: Guillaume Nault <[email protected]>
Date: Thu, 22 Oct 2015 16:57:10 +0200
Subject: ppp: fix pppoe_dev deletion condition in pppoe_release()

From: Guillaume Nault <[email protected]>

[ 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")
---
 drivers/net/ppp/pppoe.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ppp/pppoe.c +1 -1
@@ -569,7 +569,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 [email protected] are

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