PPPoE: Fix flush/close races.
PPPoE: Fix flush/close races.

Be more careful about the state of pointers during tear-down.
The "pppoe_dev" field can only be looked at safely while holding socket locks.
This subsequently allows for the flush_lock to be killed.

We depend on the PPPOX_CONNECTED state to tell us that that those fields are
valid, so whoever clears that state (pppox_unbind_sock()) is responsible for
the dev_put() call.

We also have to ensure that we delete_item() on all sockets before they are
cleaned up.

The need for these changes has been exposed by scenarios wherein namespace
bindings of ethernet devices change while there are ongoing PPPoE sessions,
which resulted in oopses due to unusual socket connection termination paths,
exposing these issues.

Signed-off-by: Michal Ostrowski <4ce7f5f96d113d3cf338520688d28b9a1aabc891@gmail.com>
Reviewed-by: Cyril Gorcunov <7a1ea01eee6961eb1e372e3508c2670446d086f4@gmail.com>
Reported-by: Denys Fedoryschenko <d29de71aea38aad3a87d486929cb0aad173ae612@visp.net.lb>
Tested-by: Denys Fedoryschenko <d29de71aea38aad3a87d486929cb0aad173ae612@visp.net.lb>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas