From: Jens Axboe <axboe@kernel.dk>
To: Paolo Valente <paolo.valente@linaro.org>
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,
Chris Evich <cevich@redhat.com>,
Patrick Dung <patdung100@gmail.com>,
Thorsten Schubert <tschubert@bafh.org>
Subject: Re: [PATCH BUGFIX] block, bfq: deschedule empty bfq_queues not referred by any process
Date: Tue, 12 Nov 2019 07:23:23 -0800 [thread overview]
Message-ID: <83a56a54-3269-ecb9-f4ae-01c3f9717279@kernel.dk> (raw)
In-Reply-To: <20191112074856.40433-1-paolo.valente@linaro.org>
On 11/11/19 11:48 PM, 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
Applied, thanks.
--
Jens Axboe
next prev parent reply other threads:[~2019-11-12 15:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-12 7:48 Paolo Valente
2019-11-12 15:23 ` Jens Axboe [this message]
2019-11-12 17:49 ` Paolo Valente
2019-11-13 12:57 ` Oleksandr Natalenko
2019-11-13 13:52 ` Paolo Valente
2019-11-13 14:25 ` Oleksandr Natalenko
2019-11-13 15:01 ` Oleksandr Natalenko
2019-11-13 17:42 ` Paolo Valente
2019-11-13 22:46 ` Jens Axboe
2019-11-14 9:22 ` Paolo Valente
2019-11-14 8:53 ` Oleksandr Natalenko
2019-11-14 9:23 ` Paolo Valente
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=83a56a54-3269-ecb9-f4ae-01c3f9717279@kernel.dk \
--to=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®