From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Yu Kuai <yukuai3@huawei.com>, "jack@suse.cz" <jack@suse.cz>,
"paolo.valente@linaro.org" <paolo.valente@linaro.org>,
"axboe@kernel.dk" <axboe@kernel.dk>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"yi.zhang@huawei.com" <yi.zhang@huawei.com>
Subject: Re: [PATCH -next v2 1/2] block, bfq: protect 'bfqd->queued' by 'bfqd->lock'
Date: Fri, 13 May 2022 06:13:02 +0000 [thread overview]
Message-ID: <76d12440-83f9-963b-da3b-94cb7ae26d94@nvidia.com> (raw)
In-Reply-To: <20220513023507.2625717-2-yukuai3@huawei.com>
On 5/12/2022 7:35 PM, Yu Kuai wrote:
> If bfq_schedule_dispatch() is called from bfq_idle_slice_timer_body(),
> then 'bfqd->queued' is read without holding 'bfqd->lock'. This is
> wrong since it can be wrote concurrently.
>
> Fix the problem by holding 'bfqd->lock' in such case.
>
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
> Reviewed-by: Jan Kara <jack@suse.cz>
> ---
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
next prev parent reply other threads:[~2022-05-13 6:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-13 2:35 [PATCH -next v2 0/2] block, bfq: make bfq_has_work() more accurate Yu Kuai
2022-05-13 2:35 ` [PATCH -next v2 1/2] block, bfq: protect 'bfqd->queued' by 'bfqd->lock' Yu Kuai
2022-05-13 6:13 ` Chaitanya Kulkarni [this message]
2022-05-13 2:35 ` [PATCH -next v2 2/2] block, bfq: make bfq_has_work() more accurate Yu Kuai
2022-05-16 9:56 ` Jan Kara
2022-05-17 14:21 ` Paolo Valente
2022-05-17 15:06 ` Paolo Valente
2022-05-18 1:17 ` yukuai (C)
2022-05-18 13:40 ` Paolo VALENTE
2022-05-16 17:39 ` [PATCH -next v2 0/2] " Jens Axboe
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=76d12440-83f9-963b-da3b-94cb7ae26d94@nvidia.com \
--to=chaitanyak@nvidia.com \
--cc=axboe@kernel.dk \
--cc=jack@suse.cz \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paolo.valente@linaro.org \
--cc=yi.zhang@huawei.com \
--cc=yukuai3@huawei.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®