summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2022-01-11 15:34:01 +0300
committerJens Axboe <axboe@kernel.dk>2022-01-17 17:24:45 +0300
commit850fd2abbe02eb2b52cbb1550adbcc89b36d65de (patch)
tree40aa03126da0e534b1475348bd5fdbe955c85aae /block
parente6a2e5116e07ce5acc8698785c29e9e47f010fd5 (diff)
downloadlinux-850fd2abbe02eb2b52cbb1550adbcc89b36d65de.tar.xz
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: 704b914f15fb ("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>
Diffstat (limited to 'block')
-rw-r--r--block/blk-sysfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index bed4a2facd65..9f32882ceb2f 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);
}