Commit 8ae3b81f authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Yang Yingliang
Browse files

nvme-loop: reset queue count to 1 in nvme_loop_destroy_io_queues()



stable inclusion
from linux-4.19.196
commit a0a60f6092b50a0cc261e829bb5fbb2ac33dac29

--------------------------------

[ Upstream commit a6c144f3 ]

The queue count is increased in nvme_loop_init_io_queues(), so we
need to reset it to 1 at the end of nvme_loop_destroy_io_queues().
Otherwise the function is not re-entrant safe, and crash will happen
during concurrent reset and remove calls.

Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Reviewed-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 9d549836
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment