linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org,
	syzbot+4f789823c1abc5accf13@syzkaller.appspotmail.com
Subject: Re: [PATCH] block: cleanup q->srcu
Date: Mon, 17 Jan 2022 11:32:49 +0800	[thread overview]
Message-ID: <YeTjYU3KVeU1sstH@T590> (raw)
In-Reply-To: <20220111123401.520192-1-ming.lei@redhat.com>

On Tue, Jan 11, 2022 at 08:34:01PM +0800, Ming Lei wrote:
> srcu structure has to be cleanup via cleanup_srcu_struct(), so fix it.
> 
> Reported-by: syzbot+4f789823c1abc5accf13@syzkaller.appspotmail.com
> Fixes: 704b914f15fb ("blk-mq: move srcu from blk_mq_hw_ctx to request_queue")
> Signed-off-by: Ming Lei <ming.lei@redhat.com>
> ---
>  block/blk-sysfs.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
> index e20eadfcf5c8..8d8549f71311 100644
> --- a/block/blk-sysfs.c
> +++ b/block/blk-sysfs.c
> @@ -811,6 +811,9 @@ static void blk_release_queue(struct kobject *kobj)
>  
>  	bioset_exit(&q->bio_split);
>  
> +	if (blk_queue_has_srcu(q))
> +		cleanup_srcu_struct(q->srcu);
> +
>  	ida_simple_remove(&blk_queue_ida, q->id);
>  	call_rcu(&q->rcu_head, blk_free_queue_rcu);

Hello Jens,

Can we make it into mainline to fix the recent syzbot report?


Thanks,
Ming


  reply	other threads:[~2022-01-17  3:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11 12:34 [PATCH] block: cleanup q->srcu Ming Lei
2022-01-17  3:32 ` Ming Lei [this message]
2022-01-17  8:39 ` Christoph Hellwig
2022-01-17 14:24 ` 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=YeTjYU3KVeU1sstH@T590 \
    --to=ming.lei@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=syzbot+4f789823c1abc5accf13@syzkaller.appspotmail.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;
as well as URLs for NNTP newsgroup(s).