Xie He 1fef73597f net: hdlc_ppp: Fix issues when mod_timer is called while timer is running
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: e022c2f07ae5 ("WAN: new synchronous PPP implementation for generic HDLC.")
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Xie He <xie.he.0141@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-12-28 15:09:04 -08:00
..
2020-12-15 16:39:06 -08:00
2020-12-17 13:34:25 -08:00
2020-12-16 16:38:41 -08:00
2020-12-17 13:34:25 -08:00
2020-12-16 16:53:54 -08:00
2020-12-15 15:24:52 +01:00
2020-12-16 16:38:41 -08:00
2020-12-15 13:22:29 -08:00
2020-12-17 12:52:23 -08:00
2020-12-16 16:38:41 -08:00
2020-12-15 16:06:14 -08:00
2020-12-16 14:48:32 -08:00
2020-12-16 11:49:46 -08:00
2020-12-16 16:38:41 -08:00
2020-12-15 16:30:31 -08:00
2020-12-16 12:57:51 -08:00
2020-12-16 13:42:26 -08:00
2020-12-16 13:58:47 -08:00
2020-12-09 19:26:02 -06:00
2020-12-16 13:09:32 -08:00
2020-12-16 16:38:41 -08:00
2020-12-16 13:34:31 -08:00
2020-12-17 13:34:25 -08:00
2020-12-15 15:57:25 -08:00
2020-12-16 14:58:35 -08:00
2020-12-16 13:42:26 -08:00
2020-12-15 14:02:26 -08:00
2020-12-15 15:24:52 +01:00
2020-12-16 13:42:26 -08:00
2020-12-15 22:50:12 +11:00
2020-12-16 16:38:41 -08:00
2020-12-16 16:38:41 -08:00
2020-12-16 15:51:15 -08:00
2020-12-17 13:34:25 -08:00
2020-12-17 13:41:27 -08:00
2020-12-10 10:45:36 +01:00
2020-12-16 16:38:41 -08:00
2020-12-16 13:34:31 -08:00
2020-12-16 16:38:41 -08:00
2020-12-17 13:41:27 -08:00
2020-12-17 13:34:25 -08:00
2020-12-16 15:51:15 -08:00
2020-12-15 12:13:37 -08:00
2020-12-17 13:34:25 -08:00
2020-12-09 19:44:34 +01:00
2020-12-16 11:53:09 -08:00