diff options
author | 2018-04-24 02:53:44 +0000 | |
---|---|---|
committer | 2018-04-24 02:53:44 +0000 | |
commit | 1c58f4a9e155be5e32e14f18a467abb3fa71993f (patch) | |
tree | 3088d18f3b9f4a93e2ce99c13102b4f3f2a3b967 | |
parent | replace my vague and idiosyncratic term "selflink" (diff) | |
download | wireguard-openbsd-1c58f4a9e155be5e32e14f18a467abb3fa71993f.tar.xz wireguard-openbsd-1c58f4a9e155be5e32e14f18a467abb3fa71993f.zip |
Do not lock the kernel when expanding the working buffer.
malloc(9) and free(9) are MP-safe nowadays.
OK mpi@
-rw-r--r-- | sys/arch/amd64/amd64/aesni.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/aesni.c b/sys/arch/amd64/amd64/aesni.c index 9d5cb606e0a..85824c479c8 100644 --- a/sys/arch/amd64/amd64/aesni.c +++ b/sys/arch/amd64/amd64/aesni.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aesni.c,v 1.45 2018/04/22 02:59:03 visa Exp $ */ +/* $OpenBSD: aesni.c,v 1.46 2018/04/24 02:53:44 visa Exp $ */ /*- * Copyright (c) 2003 Jason Wright * Copyright (c) 2003, 2004 Theo de Raadt @@ -442,7 +442,6 @@ aesni_encdec(struct cryptop *crp, struct cryptodesc *crd, aadlen = rlen = err = iskip = oskip = 0; if (crd->crd_len > ses->ses_buflen) { - KERNEL_LOCK(); if (buf != NULL) { explicit_bzero(buf, ses->ses_buflen); free(buf, M_DEVBUF, ses->ses_buflen); @@ -452,7 +451,6 @@ aesni_encdec(struct cryptop *crp, struct cryptodesc *crd, rlen = roundup(crd->crd_len, EALG_MAX_BLOCK_LEN); ses->ses_buf = buf = malloc(rlen, M_DEVBUF, M_NOWAIT | M_ZERO); - KERNEL_UNLOCK(); if (buf == NULL) return (ENOMEM); ses->ses_buflen = rlen; |