diff options
| author | Xie He <xie.he.0141@gmail.com> | 2020-12-27 18:53:39 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-01-12 19:47:54 +0100 |
| commit | 1d55c1dc692933f0d0f09f7afa57f1f73b21e7a7 (patch) | |
| tree | 8a89b249c2a4083692aba0541ab1f52c73e993b2 /drivers/net/virtio_net.c | |
| parent | d07b21eb60e7c77130835601e93ecbe3cbdb5342 (diff) | |
net: hdlc_ppp: Fix issues when mod_timer is called while timer is running
[ Upstream commit 1fef73597fa545c35fddc953979013882fbd4e55 ]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/virtio_net.c')
0 files changed, 0 insertions, 0 deletions
