Module Name: src Committed By: pgoyette Date: Sat Sep 22 10:49:09 UTC 2018
Modified Files: src/sys/opencrypto [pgoyette-compat]: ocryptodev.c Log Message: Since the caller passes the address of our mutex, use it rather than trying to reference it via global symbol (which might not exist). To generate a diff of this commit: cvs rdiff -u -r1.11.2.4 -r1.11.2.5 src/sys/opencrypto/ocryptodev.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/ocryptodev.c diff -u src/sys/opencrypto/ocryptodev.c:1.11.2.4 src/sys/opencrypto/ocryptodev.c:1.11.2.5 --- src/sys/opencrypto/ocryptodev.c:1.11.2.4 Sat Sep 22 10:33:50 2018 +++ src/sys/opencrypto/ocryptodev.c Sat Sep 22 10:49:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ocryptodev.c,v 1.11.2.4 2018/09/22 10:33:50 pgoyette Exp $ */ +/* $NetBSD: ocryptodev.c,v 1.11.2.5 2018/09/22 10:49:09 pgoyette Exp $ */ /* $FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $ */ /* $OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $ */ @@ -69,7 +69,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ocryptodev.c,v 1.11.2.4 2018/09/22 10:33:50 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ocryptodev.c,v 1.11.2.5 2018/09/22 10:49:09 pgoyette Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -162,10 +162,10 @@ mbail: kmem_free(osnop, osgop->count * sizeof(struct osession_n_op)); break; case OCIOCCRYPT: - mutex_enter(&cryptodev_mtx); + mutex_enter(mtx); ocop = (struct ocrypt_op *)data; cse = (*real_csefind)(fcr, ocop->ses); - mutex_exit(&cryptodev_mtx); + mutex_exit(mtx); if (cse == NULL) { DPRINTF("csefind failed\n"); return EINVAL;