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:
0c6af1c
)
nvme: compare NQN string with right size
author
Javier González
<jg@lightnvm.io>
Wed, 8 Nov 2017 09:59:03 +0000
(10:59 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Sat, 11 Nov 2017 02:53:25 +0000
(19:53 -0700)
Copy subnqns using NVMF_NQN_SIZE as it is < 256
Signed-off-by: Javier González <javier@cnexlabs.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c
patch
|
blob
|
history
diff --git
a/drivers/nvme/host/core.c
b/drivers/nvme/host/core.c
index 65fd2fc1ae3c20878fdbe5911be7ac7bee18801f..8a60cc786220bfc7227e23cb548f9073d6e98340 100644
(file)
--- a/
drivers/nvme/host/core.c
+++ b/
drivers/nvme/host/core.c
@@
-1810,7
+1810,7
@@
static void nvme_init_subnqn(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
nqnlen = strnlen(id->subnqn, NVMF_NQN_SIZE);
if (nqnlen > 0 && nqnlen < NVMF_NQN_SIZE) {
- str
cpy(ctrl->subnqn, id->subnqn
);
+ str
ncpy(ctrl->subnqn, id->subnqn, NVMF_NQN_SIZE
);
return;
}