From: Tejun Heo <tj@kernel.org>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
Ming Lei <tom.leiming@gmail.com>
Subject: Re: [PATCH v2 5/6] blk-mq: fix freeze queue race
Date: Thu, 9 Jul 2015 17:34:05 -0400 [thread overview]
Message-ID: <20150709213405.GB18734@mtj.duckdns.org> (raw)
In-Reply-To: <1435847397-724-6-git-send-email-akinobu.mita@gmail.com>
On Thu, Jul 02, 2015 at 11:29:56PM +0900, Akinobu Mita wrote:
> There are several race conditions while freezing queue.
...
> Also, percpu_ref_reinit() and percpu_ref_kill() must not be executed
> at the same time. Because both functions could call
> __percpu_ref_switch_to_percpu() which adds the bias value and
> initialize percpu counter.
>
> Fix those races by serializing with per-queue mutex.
>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: Ming Lei <tom.leiming@gmail.com>
Yeap, all of the kill/reinit/switch mode functions assume caller side
synchronization.
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
next prev parent reply other threads:[~2015-07-09 21:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-02 14:29 [PATCH v2 0/6] blk-mq: fix race conditions on cpu hotplug handling Akinobu Mita
2015-07-02 14:29 ` [PATCH v2 1/6] blk-mq: fix sysfs registration/unregistration race Akinobu Mita
2015-07-08 11:48 ` Ming Lei
2015-07-09 14:25 ` Akinobu Mita
2015-07-09 14:43 ` Ming Lei
2015-07-02 14:29 ` [PATCH v2 2/6] blk-mq: Fix use after of free q->mq_map Akinobu Mita
2015-07-08 11:53 ` Ming Lei
2015-07-02 14:29 ` [PATCH v2 3/6] blk-mq: fix q->mq_usage_counter access race Akinobu Mita
2015-07-08 11:53 ` Ming Lei
2015-07-02 14:29 ` [PATCH v2 4/6] blk-mq: avoid inserting requests before establishing new mapping Akinobu Mita
2015-07-09 7:04 ` Ming Lei
2015-07-02 14:29 ` [PATCH v2 5/6] blk-mq: fix freeze queue race Akinobu Mita
2015-07-09 6:55 ` Ming Lei
2015-07-09 21:37 ` Tejun Heo
2015-07-10 8:08 ` Ming Lei
2015-07-09 21:34 ` Tejun Heo [this message]
2015-07-02 14:29 ` [PATCH v2 6/6] blk-mq: fix deadlock when reading cpu_list Akinobu Mita
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=20150709213405.GB18734@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=akinobu.mita@gmail.com \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=tom.leiming@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