diff options
author | Hannes Reinecke <hare@kernel.org> | 2024-07-22 14:02:20 +0200 |
---|---|---|
committer | Keith Busch <kbusch@kernel.org> | 2024-08-22 22:25:07 +0200 |
commit | 5bc46b49c828a6dfaab80b71ecb63fe76a1096d2 (patch) | |
tree | 44332206668acf252198d641f849573cfb3cae0a /drivers/nvme/host/tcp.c | |
parent | nvme-tcp: sanitize TLS key handling (diff) | |
download | linux-5bc46b49c828a6dfaab80b71ecb63fe76a1096d2.tar.xz linux-5bc46b49c828a6dfaab80b71ecb63fe76a1096d2.zip |
nvme-tcp: check for invalidated or revoked key
key_lookup() will always return a key, even if that key is revoked
or invalidated. So check for invalid keys before continuing.
Signed-off-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme/host/tcp.c')
-rw-r--r-- | drivers/nvme/host/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index b40e95bee849..89c44413c593 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -1596,7 +1596,7 @@ static void nvme_tcp_tls_done(void *data, int status, key_serial_t pskid) goto out_complete; } - tls_key = key_lookup(pskid); + tls_key = nvme_tls_key_lookup(pskid); if (IS_ERR(tls_key)) { dev_warn(ctrl->ctrl.device, "queue %d: Invalid key %x\n", qid, pskid); |