From: Yu Kuai <yukuai1@huaweicloud.com>
To: Jan Kara <jack@suse.cz>, Yu Kuai <yukuai1@huaweicloud.com>
Cc: tj@kernel.org, josef@toxicpanda.com, axboe@kernel.dk,
paolo.valente@linaro.org, cgroups@vger.kernel.org,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
yi.zhang@huawei.com, "yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH] block, bfq: fix null pointer dereference in bfq_bio_bfqg()
Date: Tue, 8 Nov 2022 21:15:08 +0800 [thread overview]
Message-ID: <6cd64e77-e14d-ff9c-d97f-055165a7b214@huaweicloud.com> (raw)
In-Reply-To: <20221108124841.et6cddvczncp2cz7@quack3>
Hi!
在 2022/11/08 20:48, Jan Kara 写道:
>
> Hum, that is indeed contrieved ;). Your fixup makes sense so feel free to
> add:
>
> Reviewed-by: Jan Kara <jack@suse.cz>
Thanks for the review, our test do many unusual operations together...
Thanks,
Kuai
>
> Honza
>
>>
>> diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
>> index 144bca006463..7d624a3a3f0f 100644
>> --- a/block/bfq-cgroup.c
>> +++ b/block/bfq-cgroup.c
>> @@ -610,6 +610,10 @@ struct bfq_group *bfq_bio_bfqg(struct bfq_data *bfqd, struct bio *bio)
>> struct bfq_group *bfqg;
>>
>> while (blkg) {
>> + if (!blkg->online) {
>> + blkg = blkg->parent;
>> + continue;
>> + }
>> bfqg = blkg_to_bfqg(blkg);
>> if (bfqg->online) {
>> bio_associate_blkg_from_css(bio, &blkg->blkcg->css);
>> --
>> 2.31.1
>>
next prev parent reply other threads:[~2022-11-08 13:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 10:34 Yu Kuai
2022-11-08 12:48 ` Jan Kara
2022-11-08 13:15 ` Yu Kuai [this message]
2022-11-08 14:13 ` Jens Axboe
2022-11-08 22:50 ` Chaitanya Kulkarni
2022-11-10 3:30 ` Yu Kuai
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=6cd64e77-e14d-ff9c-d97f-055165a7b214@huaweicloud.com \
--to=yukuai1@huaweicloud.com \
--cc=axboe@kernel.dk \
--cc=cgroups@vger.kernel.org \
--cc=jack@suse.cz \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paolo.valente@linaro.org \
--cc=tj@kernel.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®