Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/xen/xen add KASSERT() for owned grant_lock in xengn...
details: https://anonhg.NetBSD.org/src/rev/934237c250e2
branches: trunk
changeset: 1009020:934237c250e2
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Fri Apr 10 08:35:52 2020 +0000
description:
add KASSERT() for owned grant_lock in xengnt_get_entry()
diffstat:
sys/arch/xen/xen/xengnt.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r c72ba7610758 -r 934237c250e2 sys/arch/xen/xen/xengnt.c
--- a/sys/arch/xen/xen/xengnt.c Thu Apr 09 19:26:37 2020 +0000
+++ b/sys/arch/xen/xen/xengnt.c Fri Apr 10 08:35:52 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xengnt.c,v 1.31 2020/04/09 19:26:38 jdolecek Exp $ */
+/* $NetBSD: xengnt.c,v 1.32 2020/04/10 08:35:52 jdolecek Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xengnt.c,v 1.31 2020/04/09 19:26:38 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xengnt.c,v 1.32 2020/04/10 08:35:52 jdolecek Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -336,6 +336,8 @@
static struct timeval xengnt_nonmemtime;
static const struct timeval xengnt_nonmemintvl = {5,0};
+ KASSERT(mutex_owned(&grant_lock));
+
if (__predict_false(last_gnt_entry == 0)) {
if (ratecheck(&xengnt_nonmemtime, &xengnt_nonmemintvl))
printf("xengnt_get_entry: out of grant "
Home |
Main Index |
Thread Index |
Old Index