diff --git a/sys/sys/lock.h b/sys/sys/lock.h index 03b41e3fb478..6fcb03312063 100644 --- a/sys/sys/lock.h +++ b/sys/sys/lock.h @@ -268,6 +268,9 @@ const char *witness_file(struct lock_object *); #define WITNESS_UNLOCK(lock, flags, file, line) \ witness_unlock((lock), (flags), (file), (line)) +#define WITNESS_CHECK(flags, lock, fmt, ...) \ + witness_warn((flags), (lock), (fmt), ## __VA_ARGS__) + #define WITNESS_WARN(flags, lock, fmt, ...) \ witness_warn((flags), (lock), (fmt), ## __VA_ARGS__) @@ -296,6 +299,7 @@ const char *witness_file(struct lock_object *); #define WITNESS_UPGRADE(lock, flags, file, line) #define WITNESS_DOWNGRADE(lock, flags, file, line) #define WITNESS_UNLOCK(lock, flags, file, line) +#define WITNESS_CHECK(flags, lock, fmt, ...) 0 #define WITNESS_WARN(flags, lock, fmt, ...) #define WITNESS_SAVE_DECL(n) #define WITNESS_SAVE(lock, n) diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 1cec429db462..9cba214834d1 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -1789,7 +1789,7 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags) ("malloc(M_WAITOK) in interrupt context")); if (nosleepwithlocks) { #ifdef WITNESS - badness = WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, + badness = WITNESS_CHECK(WARN_GIANTOK | WARN_SLEEPOK, NULL, "malloc(M_WAITOK) of \"%s\", forcing M_NOWAIT", zone->uz_name);