Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/opencrypto Fix ATF failures, sorry.



details:   https://anonhg.NetBSD.org/src/rev/3e53d0d73d01
branches:  trunk
changeset: 954351:3e53d0d73d01
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Tue Apr 06 03:38:04 2021 +0000

description:
Fix ATF failures, sorry.

diffstat:

 sys/opencrypto/cryptosoft.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 9b99b04e4d25 -r 3e53d0d73d01 sys/opencrypto/cryptosoft.c
--- a/sys/opencrypto/cryptosoft.c       Tue Apr 06 01:38:39 2021 +0000
+++ b/sys/opencrypto/cryptosoft.c       Tue Apr 06 03:38:04 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cryptosoft.c,v 1.60 2021/04/05 01:24:50 knakahara Exp $ */
+/*     $NetBSD: cryptosoft.c,v 1.61 2021/04/06 03:38:04 knakahara Exp $ */
 /*     $FreeBSD: src/sys/opencrypto/cryptosoft.c,v 1.2.2.1 2002/11/21 23:34:23 sam Exp $       */
 /*     $OpenBSD: cryptosoft.c,v 1.35 2002/04/26 08:43:50 deraadt Exp $ */
 
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.60 2021/04/05 01:24:50 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.61 2021/04/06 03:38:04 knakahara Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -712,7 +712,7 @@
         * copy in a buffer.
         */
 
-       data = kmem_alloc(crd->crd_len, KM_NOSLEEP);
+       data = malloc(crd->crd_len, M_CRYPTO_DATA, M_NOWAIT);
        if (data == NULL)
                return (EINVAL);
        COPYDATA(outtype, buf, crd->crd_skip, crd->crd_len, data);
@@ -723,7 +723,7 @@
                result = cxf->decompress(data, crd->crd_len, &out,
                                         *res_size);
 
-       kmem_free(data, crd->crd_len);
+       free(data, M_CRYPTO_DATA);
        if (result == 0)
                return EINVAL;
 
@@ -1115,7 +1115,7 @@
                        break;
                }
 
-               free(swd, M_CRYPTO_DATA);
+               kmem_free(swd, sizeof(*swd));
        }
 }
 



Home | Main Index | Thread Index | Old Index