Skip to content

Commit

Permalink
block: cleanup q->srcu
Browse files Browse the repository at this point in the history
srcu structure has to be cleanup via cleanup_srcu_struct(), so fix it.

Reported-by: syzbot+4f789823c1abc5accf13@syzkaller.appspotmail.com
Fixes: 704b914 ("blk-mq: move srcu from blk_mq_hw_ctx to request_queue")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220111123401.520192-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Ming Lei authored and Jens Axboe committed Jan 17, 2022
1 parent e6a2e51 commit 850fd2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions block/blk-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 850fd2a

Please sign in to comment.