From: Tejun Heo <tj@kernel.org>
To: qiang.zhang@windriver.com
Cc: pmladek@suse.com, hdanton@sina.com, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] kthread_worker: Prevent queuing delayed work from timer_fn when it is being canceled
Date: Wed, 30 Sep 2020 11:56:38 -0400 [thread overview]
Message-ID: <20200930155638.GA4441@mtj.duckdns.org> (raw)
In-Reply-To: <20200927055449.21389-1-qiang.zhang@windriver.com>
On Sun, Sep 27, 2020 at 01:54:49PM +0800, qiang.zhang@windriver.com wrote:
> From: Zqiang <qiang.zhang@windriver.com>
>
> There is a small race window when a delayed work is being canceled and
> the work still might be queued from the timer_fn:
>
> CPU0 CPU1
> kthread_cancel_delayed_work_sync()
> __kthread_cancel_work_sync()
> __kthread_cancel_work()
> work->canceling++;
> kthread_delayed_work_timer_fn()
> kthread_insert_work();
>
> BUG: kthread_insert_work() should not get called when work->canceling
> is set.
>
> Reviewed-by: Petr Mladek <pmladek@suse.com>
> Signed-off-by: Zqiang <qiang.zhang@windriver.com>
Acked-by: Tejun Heo <tj@kernel.org>
This prolly should go throgh -mm. Can you please also add a stable: tag?
Thanks.
--
tejun
prev parent reply other threads:[~2020-09-30 15:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-27 5:54 qiang.zhang
2020-09-30 15:56 ` Tejun Heo [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=20200930155638.GA4441@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=qiang.zhang@windriver.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
all inboxes | Powered by JetHome®