Source-Changes-HG archive

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

[src/trunk]: src/sys/opencrypto cryptosoft(4): Rip out nonsense to quietly ig...



details:   https://anonhg.NetBSD.org/src/rev/40a494aad4a2
branches:  trunk
changeset: 366309:40a494aad4a2
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun May 22 11:29:25 2022 +0000

description:
cryptosoft(4): Rip out nonsense to quietly ignore sid=0.

This is no longer necessary because crypto_freesession no longer
calls into the driver for session ids that were never allocated in
the first place.

diffstat:

 sys/opencrypto/cryptosoft.c |  8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diffs (29 lines):

diff -r 28287326c849 -r 40a494aad4a2 sys/opencrypto/cryptosoft.c
--- a/sys/opencrypto/cryptosoft.c       Sun May 22 11:27:33 2022 +0000
+++ b/sys/opencrypto/cryptosoft.c       Sun May 22 11:29:25 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cryptosoft.c,v 1.61 2021/04/06 03:38:04 knakahara Exp $ */
+/*     $NetBSD: cryptosoft.c,v 1.62 2022/05/22 11:29:25 riastradh 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.61 2021/04/06 03:38:04 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.62 2022/05/22 11:29:25 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1132,10 +1132,6 @@
            swcr_sessions[sid] == NULL)
                return EINVAL;
 
-       /* Silently accept and return */
-       if (sid == 0)
-               return 0;
-
        swd = swcr_sessions[sid];
        swcr_sessions[sid] = NULL;
        swcr_freesession_internal(swd);



Home | Main Index | Thread Index | Old Index