aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds2020-05-01 11:13:36 -0700
committerLinus Torvalds2020-05-01 11:13:36 -0700
commit052c467cb58748e302a95546925928e637025acc (patch)
tree7796a0233b8a53eb9f81d95a054fc9687abaed13 /drivers
parentab386c46e44eae70e2c23f27fea70014758cbbac (diff)
parent10c70d95c0f2f9a6f52d0e33243d2877370cef51 (diff)
Merge tag 'block-5.7-2020-05-01' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe: "A few fixes for this release: - NVMe pull request from Christoph, with a single fix for a double free in the namespace error handling. - Kill the bd_openers check in blk_drop_partitions(), fixing a regression in this merge window (Christoph)" * tag 'block-5.7-2020-05-01' of git://git.kernel.dk/linux-block: block: remove the bd_openers checks in blk_drop_partitions nvme: prevent double free in nvme_alloc_ns() error handling
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nvme/host/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 91c1bd659947..f2adea96b04c 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3642,6 +3642,8 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid)
return;
out_put_disk:
+ /* prevent double queue cleanup */
+ ns->disk->queue = NULL;
put_disk(ns->disk);
out_unlink_ns:
mutex_lock(&ctrl->subsys->lock);