From: Jens Axboe <axboe@kernel.dk>
To: Jan Kara <jack@suse.cz>
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH] block: Fix list corruption of blk stats callback list
Date: Tue, 11 Apr 2017 08:09:51 -0600 [thread overview]
Message-ID: <7bacae93-53ec-1af1-4038-1c32765db181@kernel.dk> (raw)
In-Reply-To: <20170411092901.5974-1-jack@suse.cz>
On 04/11/2017 03:29 AM, Jan Kara wrote:
> When CFQ calls wbt_disable_default(), it will call
> blk_stat_remove_callback() to stop gathering IO statistics for the
> purposes of writeback throttling. Later, when request_queue is
> unregistered, wbt_exit() will call blk_stat_remove_callback() again
> which will try to delete callback from the list again and possibly cause
> list corruption.
>
> Fix the problem by making wbt_disable_default() called wbt_exit() which
> is properly guarded against being called multiple times.
>
> Signed-off-by: Jan Kara <jack@suse.cz>
> ---
> block/blk-wbt.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> So this fixes the list debug errors reported by 0-day for me. It was a
> pre-existing problem with wbt_disable_default().
Thanks Jan, added for 4.12.
--
Jens Axboe
prev parent reply other threads:[~2017-04-11 14:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-11 9:29 [PATCH] block: Fix list corruption of blk stats callback list Jan Kara
2017-04-11 14:09 ` Jens Axboe [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=7bacae93-53ec-1af1-4038-1c32765db181@kernel.dk \
--to=axboe@kernel.dk \
--cc=jack@suse.cz \
--cc=linux-block@vger.kernel.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