diff options
| author | Jens Axboe <axboe@kernel.dk> | 2022-08-11 08:37:48 -0600 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2022-08-11 08:37:48 -0600 |
| commit | cd83cd55878409299f4614c5138d24dffacc39bd (patch) | |
| tree | 0eb1a273847bc65799be911765ae3c0713d3ec83 /drivers/nvme/target/fabrics-cmd-auth.c | |
| parent | fa9db655d0e112c108fe838809608caf759bdf5e (diff) | |
| parent | f37527a09dac324c74bb341c841096395a2f2566 (diff) | |
| download | linux-cd83cd55878409299f4614c5138d24dffacc39bd.tar.gz linux-cd83cd55878409299f4614c5138d24dffacc39bd.tar.bz2 linux-cd83cd55878409299f4614c5138d24dffacc39bd.zip | |
Merge tag 'nvme-6.0-2022-08-11' of git://git.infradead.org/nvme into block-6.0
Pull NVMe fixes from Christoph:
"nvme fixes for Linux 6.0
- print nvme connect Linux error codes properly (Amit Engel)
- fix the fc_appid_store return value (Christoph Hellwig)
- fix a typo in an error message (Christophe JAILLET)
- add another non-unique identifier quirk (Dennis P. Kliem)
- check if the queue is allocated before stopping it in nvme-tcp
(Maurizio Lombardi)
- restart admin queue if the caller needs to restart queue in nvme-fc
(Ming Lei)
- use kmemdup instead of kmalloc + memcpy in nvme-auth (Zhang Xiaoxu)"
* tag 'nvme-6.0-2022-08-11' of git://git.infradead.org/nvme:
nvme-pci: add NVME_QUIRK_BOGUS_NID for ADATA XPG GAMMIX S70
nvme-tcp: check if the queue is allocated before stopping it
nvme-fabrics: Fix a typo in an error message
nvme-fabrics: parse nvme connect Linux error codes
nvmet-auth: use kmemdup instead of kmalloc + memcpy
nvme-fc: fix the fc_appid_store return value
nvme-fc: restart admin queue if the caller needs to restart queue
Diffstat (limited to 'drivers/nvme/target/fabrics-cmd-auth.c')
| -rw-r--r-- | drivers/nvme/target/fabrics-cmd-auth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/target/fabrics-cmd-auth.c b/drivers/nvme/target/fabrics-cmd-auth.c index c851814d6cb0..ebdf9aa81041 100644 --- a/drivers/nvme/target/fabrics-cmd-auth.c +++ b/drivers/nvme/target/fabrics-cmd-auth.c @@ -160,10 +160,10 @@ static u16 nvmet_auth_reply(struct nvmet_req *req, void *d) pr_debug("%s: ctrl %d qid %d host authenticated\n", __func__, ctrl->cntlid, req->sq->qid); if (data->cvalid) { - req->sq->dhchap_c2 = kmalloc(data->hl, GFP_KERNEL); + req->sq->dhchap_c2 = kmemdup(data->rval + data->hl, data->hl, + GFP_KERNEL); if (!req->sq->dhchap_c2) return NVME_AUTH_DHCHAP_FAILURE_FAILED; - memcpy(req->sq->dhchap_c2, data->rval + data->hl, data->hl); pr_debug("%s: ctrl %d qid %d challenge %*ph\n", __func__, ctrl->cntlid, req->sq->qid, data->hl, |
