]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
nvme-fabrics: initialize default host->id in nvmf_host_default()
authorEwan D. Milne <emilne@redhat.com>
Fri, 5 Jan 2018 17:44:06 +0000 (12:44 -0500)
committerChristoph Hellwig <hch@lst.de>
Mon, 8 Jan 2018 09:52:03 +0000 (10:52 +0100)
The field was uninitialized before use.

Signed-off-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fabrics.c

index 76b4fe6816a03533dbb6bbfbf30016110a26c648..894c2ccb3891e0b83e1c839f0b08f4cba5d179ae 100644 (file)
@@ -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);