Patch "ppp: fix pppoe_dev deletion condition in pppoe_release()" has been added to the 4.2-stable tree
Subsystems (3)
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.2-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.2 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 Tue Nov 17 14:34:38 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.
--- drivers/net/ppp/pppoe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ppp/pppoe.c +1 -1
@@ -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 [email protected] are
queue-4.2/ppp-fix-pppoe_dev-deletion-condition-in-pppoe_release.patch