netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: xie.he.0141@gmail.com
Cc: kuba@kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, khc@pm.waw.pl
Subject: Re: [PATCH net v2] net: hdlc_ppp: Fix issues when mod_timer is called while timer is running
Date: Mon, 28 Dec 2020 15:11:02 -0800 (PST)	[thread overview]
Message-ID: <20201228.151102.1580596487777420764.davem@davemloft.net> (raw)
In-Reply-To: <20201228025339.3210-1-xie.he.0141@gmail.com>

From: Xie He <xie.he.0141@gmail.com>
Date: Sun, 27 Dec 2020 18:53:39 -0800

> 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>

Applied and queued up for -stable, thanks!

      reply	other threads:[~2020-12-28 23:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-28  2:53 [PATCH net v2] net: hdlc_ppp: Fix issues when mod_timer is called while timer is running Xie He
2020-12-28 23:11 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201228.151102.1580596487777420764.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=khc@pm.waw.pl \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=xie.he.0141@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).