From: Sagi Grimberg Date: Sun, 13 Nov 2022 11:24:15 +0000 (+0200) Subject: nvme-auth: clear sensitive info right after authentication completes X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8d1c1904e94757b78c28fbbef9285e4101d86ee9;p=linux.git nvme-auth: clear sensitive info right after authentication completes We don't want to keep authentication sensitive info in memory for unlimited amount of time. Reviewed-by: Hannes Reinecke Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig --- diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c index 1b44676b61553..04cf183d9519e 100644 --- a/drivers/nvme/host/auth.c +++ b/drivers/nvme/host/auth.c @@ -912,6 +912,8 @@ int nvme_auth_wait(struct nvme_ctrl *ctrl, int qid) mutex_unlock(&ctrl->dhchap_auth_mutex); flush_work(&chap->auth_work); ret = chap->error; + /* clear sensitive info */ + nvme_auth_reset_dhchap(chap); return ret; } mutex_unlock(&ctrl->dhchap_auth_mutex);