From: "Holger Hoffstätte" <holger@applied-asynchrony.com>
To: Paolo Valente <paolo.valente@linaro.org>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
ulf.hansson@linaro.org, linus.walleij@linaro.org,
bfq-iosched@googlegroups.com, oleksandr@natalenko.name,
tschubert@bafh.org, patdung100@gmail.com, cevich@redhat.com
Subject: Re: [PATCH BUGFIX V2 1/1] block, bfq: deschedule empty bfq_queues not referred by any process
Date: Fri, 15 Nov 2019 19:32:50 +0100 [thread overview]
Message-ID: <89dde326-fc76-10cc-5ec9-ec5fd4dae4ac@applied-asynchrony.com> (raw)
In-Reply-To: <20191114093311.47877-2-paolo.valente@linaro.org>
On 11/14/19 10:33 AM, Paolo Valente wrote:
> Since commit 3726112ec731 ("block, bfq: re-schedule empty queues if
> they deserve I/O plugging"), to prevent the service guarantees of a
> bfq_queue from being violated, the bfq_queue may be left busy, i.e.,
> scheduled for service, even if empty (see comments in
> __bfq_bfqq_expire() for details). But, if no process will send
> requests to the bfq_queue any longer, then there is no point in
> keeping the bfq_queue scheduled for service.
>
> In addition, keeping the bfq_queue scheduled for service, but with no
> process reference any longer, may cause the bfq_queue to be freed when
> descheduled from service. But this is assumed to never happen, and
> causes a UAF if it happens. This, in turn, caused crashes [1, 2].
>
> This commit fixes this issue by descheduling an empty bfq_queue when
> it remains with not process reference.
>
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=1767539
> [2] https://bugzilla.kernel.org/show_bug.cgi?id=205447
>
> Fixes: 3726112ec731 ("block, bfq: re-schedule empty queues if they deserve I/O plugging")
> Reported-by: Chris Evich <cevich@redhat.com>
> Reported-by: Patrick Dung <patdung100@gmail.com>
> Reported-by: Thorsten Schubert <tschubert@bafh.org>
> Tested-by: Thorsten Schubert <tschubert@bafh.org>
> Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
> Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
Jens,
can you please also tag this for stable-5.3 before the next push?
The original problem was found on 5.3 after all, and hoping for the
stable-bot to pick it up automagically is a bit unreliable.
Thanks,
Holger
next prev parent reply other threads:[~2019-11-15 18:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-14 9:33 [PATCH BUGFIX V2 0/1] " Paolo Valente
2019-11-14 9:33 ` [PATCH BUGFIX V2 1/1] " Paolo Valente
2019-11-15 18:32 ` Holger Hoffstätte [this message]
2019-11-15 18:38 ` Jens Axboe
2019-11-14 14:02 ` [PATCH BUGFIX V2 0/1] " Jens Axboe
2019-11-14 15:14 ` Paolo Valente
2019-11-14 15:19 ` 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=89dde326-fc76-10cc-5ec9-ec5fd4dae4ac@applied-asynchrony.com \
--to=holger@applied-asynchrony.com \
--cc=axboe@kernel.dk \
--cc=bfq-iosched@googlegroups.com \
--cc=cevich@redhat.com \
--cc=linus.walleij@linaro.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleksandr@natalenko.name \
--cc=paolo.valente@linaro.org \
--cc=patdung100@gmail.com \
--cc=tschubert@bafh.org \
--cc=ulf.hansson@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
all inboxes | Powered by JetHome®