projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb46483
)
nvme: fix KASAN warning when parsing host nqn
author
Hannes Reinecke
<hare@suse.de>
Fri, 25 May 2018 09:04:03 +0000
(11:04 +0200)
committer
Christoph Hellwig
<hch@lst.de>
Fri, 25 May 2018 14:50:12 +0000
(16:50 +0200)
The host nqn actually is smaller than the space reserved for it,
so we should be using strlcpy to keep KASAN happy.
Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fabrics.c
patch
|
blob
|
history
diff --git
a/drivers/nvme/host/fabrics.c
b/drivers/nvme/host/fabrics.c
index 8cb3d73e957dbe15333ba42d833e3b292fe24f34..aa318136460ef91f9bfa5c804aa36f53740b35eb 100644
(file)
--- a/
drivers/nvme/host/fabrics.c
+++ b/
drivers/nvme/host/fabrics.c
@@
-57,7
+57,7
@@
static struct nvmf_host *nvmf_host_add(const char *hostnqn)
goto out_unlock;
kref_init(&host->ref);
-
mem
cpy(host->nqn, hostnqn, NVMF_NQN_SIZE);
+
strl
cpy(host->nqn, hostnqn, NVMF_NQN_SIZE);
list_add_tail(&host->list, &nvmf_hosts);
out_unlock: