aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cxgbe
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-08-08 18:21:54 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2022-08-08 18:21:54 +0000
commit1ca4f45ea89f10621bf7e9cfea1705d0a7940bea (patch)
tree450979718aa99f87a4242d44f7efbd5046175067 /sys/dev/cxgbe
parentbbb2f537156b663560cb0a45933c0fafdd2525a3 (diff)
Diffstat (limited to 'sys/dev/cxgbe')
-rw-r--r--sys/dev/cxgbe/crypto/t4_keyctx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/cxgbe/crypto/t4_keyctx.c b/sys/dev/cxgbe/crypto/t4_keyctx.c
index 136aba759a08..a5b15e5243eb 100644
--- a/sys/dev/cxgbe/crypto/t4_keyctx.c
+++ b/sys/dev/cxgbe/crypto/t4_keyctx.c
@@ -640,6 +640,9 @@ t4_alloc_tls_keyid(struct adapter *sc)
{
vmem_addr_t addr;
+ if (sc->vres.key.size == 0)
+ return (-1);
+
if (vmem_alloc(sc->key_map, TLS_KEY_CONTEXT_SZ, M_NOWAIT | M_FIRSTFIT,
&addr) != 0)
return (-1);