From 7550e3eac458765f2e331cff65711ce0ee39e83b Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Tue, 19 Jun 2007 13:13:17 +0000 Subject: [PATCH] Add the witness warning for free_unr. Function could sleep, thus callers shall not have any non-sleepable locks held. Submitted by: Hans Petter Selasky Approved by: re (kensmith) --- sys/kern/subr_unit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/subr_unit.c b/sys/kern/subr_unit.c index 910020d9c48..764f26f6784 100644 --- a/sys/kern/subr_unit.c +++ b/sys/kern/subr_unit.c @@ -714,6 +714,7 @@ free_unr(struct unrhdr *uh, u_int item) { void *p1, *p2; + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "free_unr"); p1 = Malloc(sizeof(struct unr)); p2 = Malloc(sizeof(struct unr)); mtx_lock(uh->mtx);