Skip to content

Commit 47ed39e

Browse files
committed
Merge branch 'nvme-5.7' of git://git.infradead.org/nvme into block-5.7
Pull NVMe fix from Christoph. * 'nvme-5.7' of git://git.infradead.org/nvme: nvme: prevent double free in nvme_alloc_ns() error handling
2 parents d205bde + 132be62 commit 47ed39e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/nvme/host/core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3642,6 +3642,8 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid)
36423642

36433643
return;
36443644
out_put_disk:
3645+
/* prevent double queue cleanup */
3646+
ns->disk->queue = NULL;
36453647
put_disk(ns->disk);
36463648
out_unlink_ns:
36473649
mutex_lock(&ctrl->subsys->lock);

0 commit comments

Comments
 (0)