Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netipsec Use KDASSERT instead of KASSERT for mutex_ownable
details: https://anonhg.NetBSD.org/src/rev/c12ea70a1943
branches: trunk
changeset: 355625:c12ea70a1943
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Mon Aug 07 03:20:02 2017 +0000
description:
Use KDASSERT instead of KASSERT for mutex_ownable
Because mutex_ownable is too heavy to run in a fast path
even for DIAGNOSTIC + LOCKDEBUG.
Suggested by riastradh@
diffstat:
sys/netipsec/key.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r ab4234fc2dc7 -r c12ea70a1943 sys/netipsec/key.c
--- a/sys/netipsec/key.c Mon Aug 07 03:18:32 2017 +0000
+++ b/sys/netipsec/key.c Mon Aug 07 03:20:02 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: key.c,v 1.206 2017/08/03 06:32:51 ozaki-r Exp $ */
+/* $NetBSD: key.c,v 1.207 2017/08/07 03:20:02 ozaki-r Exp $ */
/* $FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $ */
/* $KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $ */
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.206 2017/08/03 06:32:51 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.207 2017/08/07 03:20:02 ozaki-r Exp $");
/*
* This code is referd to RFC 2367
@@ -1297,7 +1297,7 @@
key_sp_unref(struct secpolicy *sp, const char* where, int tag)
{
- KASSERT(mutex_ownable(&key_sp_mtx));
+ KDASSERT(mutex_ownable(&key_sp_mtx));
KEYDEBUG_PRINTF(KEYDEBUG_IPSEC_STAMP,
"DP SP:%p (ID=%u) from %s:%u; refcnt-- now %u\n",
Home |
Main Index |
Thread Index |
Old Index