Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/librump/rumpkern Don't attempt to detach an evcnt b...



details:   https://anonhg.NetBSD.org/src/rev/b7e529500284
branches:  trunk
changeset: 1008465:b7e529500284
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Mon Mar 23 14:49:50 2020 +0000

description:
Don't attempt to detach an evcnt before attaching it.  If its not
already attached, we will panic.

It turns out that this check wasn't really needed anyway, it was
simply paranoia on my part.

Thanks to hannken@ for bringing this to my attention.

diffstat:

 sys/rump/librump/rumpkern/rump.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (34 lines):

diff -r 9b9d6d8b67f4 -r b7e529500284 sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c  Mon Mar 23 13:56:12 2020 +0000
+++ b/sys/rump/librump/rumpkern/rump.c  Mon Mar 23 14:49:50 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump.c,v 1.343 2020/03/22 13:30:10 pgoyette Exp $      */
+/*     $NetBSD: rump.c,v 1.344 2020/03/23 14:49:50 pgoyette Exp $      */
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.343 2020/03/22 13:30:10 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.344 2020/03/23 14:49:50 pgoyette Exp $");
 
 #include <sys/systm.h>
 #define ELFSIZE ARCH_ELFSIZE
@@ -647,14 +647,12 @@
 }
 
 /*
- * Add an evcnt.  Just in case it might already have been added, remove
- * it first.
+ * Add an evcnt.
  */
 static void
 add_static_evcnt(struct evcnt *ev)
 {
 
-       evcnt_detach(ev);
        evcnt_attach_static(ev);
 }
 



Home | Main Index | Thread Index | Old Index