aboutsummaryrefslogtreecommitdiff
path: root/drivers/nvme/target/auth.c
diff options
context:
space:
mode:
authorGravatar Hannes Reinecke <hare@suse.de> 2022-06-27 11:52:07 +0200
committerGravatar Jens Axboe <axboe@kernel.dk> 2022-08-02 17:14:50 -0600
commit1a70200f404ae210b4f0334e3936e84f8edb6bc8 (patch)
treef79b74b21a04789116da60920fe1134943087037 /drivers/nvme/target/auth.c
parentnvmet-auth: Diffie-Hellman key exchange support (diff)
downloadlinux-1a70200f404ae210b4f0334e3936e84f8edb6bc8.tar.gz
linux-1a70200f404ae210b4f0334e3936e84f8edb6bc8.tar.bz2
linux-1a70200f404ae210b4f0334e3936e84f8edb6bc8.zip
nvmet-auth: expire authentication sessions
Each authentication step is required to be completed within the KATO interval (or two minutes if not set). So add a workqueue function to reset the transaction ID and the expected next protocol step; this will automatically the next authentication command referring to the terminated authentication. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/target/auth.c')
-rw-r--r--drivers/nvme/target/auth.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/target/auth.c b/drivers/nvme/target/auth.c
index d5624bdf834b..bf92435c783c 100644
--- a/drivers/nvme/target/auth.c
+++ b/drivers/nvme/target/auth.c
@@ -218,6 +218,7 @@ out_unlock:
void nvmet_auth_sq_free(struct nvmet_sq *sq)
{
+ cancel_delayed_work(&sq->auth_expired_work);
kfree(sq->dhchap_c1);
sq->dhchap_c1 = NULL;
kfree(sq->dhchap_c2);