Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: hdlc_ppp: Fix issues when mod_timer is called while timer is run…
…ning ppp_cp_event is called directly or indirectly by ppp_rx with "ppp->lock" held. It may call mod_timer to add a new timer. However, at the same time ppp_timer may be already running and waiting for "ppp->lock". In this case, there's no need for ppp_timer to continue running and it can just exit. If we let ppp_timer continue running, it may call add_timer. This causes kernel panic because add_timer can't be called with a timer pending. This patch fixes this problem. Fixes: e022c2f ("WAN: new synchronous PPP implementation for generic HDLC.") Cc: Krzysztof Halasa <[email protected]> Signed-off-by: Xie He <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- Loading branch information