Skip to content

Commit da0342a

Browse files
hreineckeChristoph Hellwig
authored andcommitted
nvmet-auth: 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 <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>
1 parent 200dccd commit da0342a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/nvme/target/auth.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ int nvmet_setup_auth(struct nvmet_ctrl *ctrl)
196196
if (IS_ERR(ctrl->ctrl_key)) {
197197
ret = PTR_ERR(ctrl->ctrl_key);
198198
ctrl->ctrl_key = NULL;
199+
goto out_free_hash;
199200
}
200201
pr_debug("%s: using ctrl hash %s key %*ph\n", __func__,
201202
ctrl->ctrl_key->hash > 0 ?

0 commit comments

Comments
 (0)