Module Name:    src
Committed By:   riastradh
Date:           Sun May 22 11:29:25 UTC 2022

Modified Files:
        src/sys/opencrypto: cryptosoft.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/opencrypto/cryptosoft.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/opencrypto/cryptosoft.c
diff -u src/sys/opencrypto/cryptosoft.c:1.61 src/sys/opencrypto/cryptosoft.c:1.62
--- src/sys/opencrypto/cryptosoft.c:1.61	Tue Apr  6 03:38:04 2021
+++ src/sys/opencrypto/cryptosoft.c	Sun May 22 11:29:25 2022
@@ -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_freesession(void *arg, u_int64_t ti
 	    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);

Reply via email to