summaryrefslogtreecommitdiff
path: root/drivers/nvme
diff options
context:
space:
mode:
authorEwan D. Milne <emilne@redhat.com>2018-01-05 12:44:06 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-03 10:24:36 +0100
commitfa10314f23bc9158137fc642034ee5042e89ceac (patch)
tree1cd0bd04cd6201350f8debd808ca7036dfe9658f /drivers/nvme
parent5e1311a13449e77022608d95ffa6623a2cc084d0 (diff)
nvme-fabrics: initialize default host->id in nvmf_host_default()
[ Upstream commit 6b018235b4daabae96d855219fae59c3fb8be417 ] The field was uninitialized before use. Signed-off-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/fabrics.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 555c976cc2ee..8cd42544c90e 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -74,6 +74,7 @@ static struct nvmf_host *nvmf_host_default(void)
return NULL;
kref_init(&host->ref);
+ uuid_gen(&host->id);
snprintf(host->nqn, NVMF_NQN_SIZE,
"nqn.2014-08.org.nvmexpress:uuid:%pUb", &host->id);