Skip to content

Commit 850fd2a

Browse files
Ming Leiaxboe
authored andcommitted
block: cleanup q->srcu
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>
1 parent e6a2e51 commit 850fd2a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

block/blk-sysfs.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,9 @@ static void blk_release_queue(struct kobject *kobj)
811811

812812
bioset_exit(&q->bio_split);
813813

814+
if (blk_queue_has_srcu(q))
815+
cleanup_srcu_struct(q->srcu);
816+
814817
ida_simple_remove(&blk_queue_ida, q->id);
815818
call_rcu(&q->rcu_head, blk_free_queue_rcu);
816819
}

0 commit comments

Comments
 (0)