From: Guenter Roeck <linux@roeck-us.net>
To: Paolo Valente <paolo.valente@linaro.org>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block <linux-block@vger.kernel.org>,
kernel list <linux-kernel@vger.kernel.org>,
Hsin-Yi Wang <hsinyi@google.com>,
Nicolas Boichat <drinkcat@chromium.org>,
Doug Anderson <dianders@chromium.org>
Subject: Re: [PATCH] bfq: Check if bfqq is NULL in bfq_insert_request
Date: Tue, 30 Jul 2019 10:06:25 -0700 [thread overview]
Message-ID: <20190730170625.GA19996@roeck-us.net> (raw)
In-Reply-To: <0BCD5EDA-6D08-4023-9EEA-087F0AB99D47@linaro.org>
Paolo,
On Tue, Jul 30, 2019 at 10:55:24AM +0200, Paolo Valente wrote:
> Hi Guenter,
> sorry for the delay (Dolomiti's fault).
>
> I didn't consider that rq->elv-icq might have been NULL also
> because of OOM. Thanks for spotting this issue.
>
> As for the other places where the return value of bfq_init_rq is used,
> unfortunately I think they matter too. Those other places are related
> to request merging, which is the alternative destiny of requests
> (instead of being just inserted). But, regardless of whether a
> request is to be merged or inserted, that request may be destined to a
> bfq_queue (possibly merged with a request already in a bfq_queue), and
> a NULL return value by bfq_init_rq leads to a crash. I guess you can
> reproduce your failure also for the merge case, by generating
> sequential, direct I/O with queue depth > 1, and of course by enabling
> failslab.
>
> If my considerations above are correct, do you want to propose a
> complete fix yourself?
>
I had another look into the code. Unfortunately, both bfq_request_merged()
and bfq_requests_merged() simply assume that bfq_init_rq() never returns
NULL, and don't give me an idea for a path of action if it returns NULL
after all. I'll have to pass the problem off to you for a fix.
Thanks,
Guenter
prev parent reply other threads:[~2019-07-30 17:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 17:30 [PATCH] bfq: Check if bfqq is NULL in bfq_insert_request Guenter Roeck
2019-07-22 20:29 ` Guenter Roeck
2019-07-22 23:36 ` Bob Liu
2019-07-23 0:06 ` Guenter Roeck
2019-07-28 15:19 ` Guenter Roeck
2019-07-30 8:55 ` Paolo Valente
2019-07-30 13:35 ` Guenter Roeck
2019-07-31 10:11 ` Paolo Valente
2019-07-31 13:20 ` Guenter Roeck
2019-07-30 17:06 ` Guenter Roeck [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=20190730170625.GA19996@roeck-us.net \
--to=linux@roeck-us.net \
--cc=axboe@kernel.dk \
--cc=dianders@chromium.org \
--cc=drinkcat@chromium.org \
--cc=hsinyi@google.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paolo.valente@linaro.org \
/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).