diff options
author | 2020-04-30 09:32:48 -0600 | |
---|---|---|
committer | 2020-04-30 09:32:48 -0600 | |
commit | 47ed39e0625d3a47b6d6c0a12942b62fb802298f (patch) | |
tree | 6bc279c67a6338e21deba9bc13f4d6e90bb5ec79 | |
parent | null_blk: Cleanup zoned device initialization (diff) | |
parent | nvme: prevent double free in nvme_alloc_ns() error handling (diff) | |
download | wireguard-linux-47ed39e0625d3a47b6d6c0a12942b62fb802298f.tar.xz wireguard-linux-47ed39e0625d3a47b6d6c0a12942b62fb802298f.zip |
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
-rw-r--r-- | drivers/nvme/host/core.c | 2 |
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); |