On Tue 05/07/2022 21:15, Vitaliy Makkoveev wrote: > pppoe_timeout() and pppoe_clone_destroy() are both executed with kernel > lock held, but they are not serialized because pppoe_timeout() has the > sleep point provided by netlock. We should use timeout_del_barrier(9) to > ensure pppoe_timeout() finished. Also pppoe_timeout() could be > rescheduled if the interface state `sc_state' is PPPOE_STATE_PADI_SENT > or PPPOE_STATE_PADR_SENT. The interface could be destroyed in any > connection state, so introduce new PPPOE_STATE_DYING state and use it to > prevent timeout rescheduling. > > Do sppp_detach() after if_detach(). It destroys some `ifp' data, so it > should be called after the interface was unlinked from the stack. > > Also do sppp_attach() before if_attach() call because initializes and > setups `ifp' data. > > ok?
Diff tested on a pppoe(4) setup, works for me. OK bket@