diff options
author | kib <kib@FreeBSD.org> | 2007-06-19 13:13:17 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2007-06-19 13:13:17 +0000 |
commit | 25d265f0644f99cf9847a5fab49b5c3bf4a298bd (patch) | |
tree | c3a2a6d8ce53290fa2c079b5be576b4089239ae1 /sys/kern/subr_unit.c | |
parent | aca1637869725756eb7d020f4af03c15a613a3d9 (diff) | |
download | FreeBSD-src-25d265f0644f99cf9847a5fab49b5c3bf4a298bd.zip FreeBSD-src-25d265f0644f99cf9847a5fab49b5c3bf4a298bd.tar.gz |
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 <hselasky c2i net>
Approved by: re (kensmith)
Diffstat (limited to 'sys/kern/subr_unit.c')
-rw-r--r-- | sys/kern/subr_unit.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/subr_unit.c b/sys/kern/subr_unit.c index 910020d..764f26f 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); |