diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2015-10-22 16:57:10 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-09 13:40:06 -0500 |
commit | e42f6b5c7bcf22062a389d40cbf2a723aab4d2df (patch) | |
tree | d47d6b41bea2bab35ac0d207658ef7d7af712680 /net | |
parent | edbdd72399cf707f3086a8c3df35e435381fd227 (diff) | |
download | linux-stable-e42f6b5c7bcf22062a389d40cbf2a723aab4d2df.tar.gz linux-stable-e42f6b5c7bcf22062a389d40cbf2a723aab4d2df.tar.bz2 linux-stable-e42f6b5c7bcf22062a389d40cbf2a723aab4d2df.zip |
ppp: fix pppoe_dev deletion condition in pppoe_release()
[ 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>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions