[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1625477143-18716-1-git-send-email-wangqing@vivo.com>
Date: Mon, 5 Jul 2021 17:25:43 +0800
From: Wang Qing <wangqing@...o.com>
To: Josef Bacik <josef@...icpanda.com>, Jens Axboe <axboe@...nel.dk>,
Chaitanya Kulkarni <chaitanya.kulkarni@....com>,
linux-block@...r.kernel.org, nbd@...er.debian.org,
linux-kernel@...r.kernel.org
Cc: Wang Qing <wangqing@...o.com>,
Guoqing Jiang <guoqing.jiang@...ud.ionos.com>
Subject: [PATCH] block: nbd: fix order of cleaning up the queue and freeing the tagset
Must release the queue before freeing the tagset.
Fixes: 1c99502fae35 ("loop: use blk_mq_alloc_disk and blk_cleanup_disk")
Reported-and-tested-by: syzbot+9ca43ff47167c0ee3466@...kaller.appspotmail.com
Signed-off-by: Wang Qing <wangqing@...o.com>
Signed-off-by: Guoqing Jiang <guoqing.jiang@...ud.ionos.com>
---
drivers/block/nbd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index b7d6637..c383179
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -239,8 +239,8 @@ static void nbd_dev_remove(struct nbd_device *nbd)
if (disk) {
del_gendisk(disk);
- blk_mq_free_tag_set(&nbd->tag_set);
blk_cleanup_disk(disk);
+ blk_mq_free_tag_set(&nbd->tag_set);
}
/*
--
2.7.4
Powered by blists - more mailing lists