From: Guillaume Nault Date: Thu, 22 Oct 2015 14:57:10 +0000 (+0200) Subject: ppp: fix pppoe_dev deletion condition in pppoe_release() X-Git-Tag: v3.2.73~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3e62cc7abb53bc0317be8b3a0ba98b36768630d;p=pandora-kernel.git ppp: fix pppoe_dev deletion condition in pppoe_release() commit 1acea4f6ce1b1c0941438aca75dd2e5c6b09db60 upstream. 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 Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed