This is a note to let you know that I've just added the patch titled nvme: release namespace head reference on error to the 5.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: nvme-release-namespace-head-reference-on-error.patch and it can be found in the queue-5.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From ac262508daa88fb12c5dc53cf30bde163f9f26c9 Mon Sep 17 00:00:00 2001 From: Keith Busch <kbusch@xxxxxxxxxx> Date: Thu, 9 Apr 2020 09:09:00 -0700 Subject: nvme: release namespace head reference on error From: Keith Busch <kbusch@xxxxxxxxxx> commit ac262508daa88fb12c5dc53cf30bde163f9f26c9 upstream. If a namespace identification does not match the subsystem's head for that NSID, release the reference that was taken when the matching head was initially found. Signed-off-by: Keith Busch <kbusch@xxxxxxxxxx> Reviewed-by: Sagi Grimberg <sagi@xxxxxxxxxxx> Signed-off-by: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/nvme/host/core.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -3467,6 +3467,7 @@ static int nvme_init_ns_head(struct nvme "IDs don't match for shared namespace %d\n", nsid); ret = -EINVAL; + nvme_put_ns_head(head); goto out_unlock; } } Patches currently in stable-queue which might be from kbusch@xxxxxxxxxx are queue-5.4/nvme-unlink-head-after-removing-last-namespace.patch queue-5.4/nvme-release-namespace-head-reference-on-error.patch