Skip to content

Commit

Permalink
nvmet-auth: add missing goto in nvmet_setup_auth()
Browse files Browse the repository at this point in the history
There's a goto missing in nvmet_setup_auth(), causing a kernel oops
when nvme_auth_extract_key() fails.

Reported-by: Tal Lossos <tallossos@gmail.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Hannes Reinecke authored and Christoph Hellwig committed Aug 31, 2022
1 parent 200dccd commit da0342a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/nvme/target/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?
Expand Down

0 comments on commit da0342a

Please sign in to comment.