nvme-target: add missing goto in nvmet_setup_auth()
Subsystems (3)
Hannes Reinecke
maintainerPATCH 1/1 nvme-target: add missing goto in nvmet_setup_auth()
There's a goto missing in nvmet_setup_auth(), causing a kernel oops when nvme_auth_extract_key() fails.
Reported-by Tal Lossos <[email protected]>
Signed-off-by Hannes Reinecke <[email protected]>
--- drivers/nvme/target/auth.c | 1 + 1 file changed, 1 insertion(+)
drivers/nvme/target/auth.c +1 -0
@@ -196,6 +196,7 @@ int nvmet_setup_auth(struct nvmet_ctrl *ctrl)if (IS_ERR (ctrl->ctrl_key)) { ret =PTR_ERR (ctrl->ctrl_key); ctrl->ctrl_key =NULL ; + goto out_free_hash; } pr_debug("%s: using ctrl hash %s key %*ph\n", __func__, ctrl->ctrl_key->hash > 0 ?
Signature · 1 line
2.35.3
Quoted 6 lines · Hannes Reinecke
There's a goto missing in
nvmet_setup_auth(), causing a kernel oops whennvme_auth_extract_key()fails.Reported-by Tal Lossos <[email protected]>Signed-off-by Hannes Reinecke <[email protected]>---
Looks good.
Reviewed-by Chaitanya Kulkarni <[email protected]>
-ck
Reviewed-by Sagi Grimberg <[email protected]>
Thanks,
applied to nvme-6.0.