Page MenuHomeFreeBSD

D830.id1750.diff
No OneTemporary

D830.id1750.diff

Index: sys/kern/kern_malloc.c
===================================================================
--- sys/kern/kern_malloc.c
+++ sys/kern/kern_malloc.c
@@ -472,9 +472,12 @@
}
}
#endif
- if (flags & M_WAITOK)
+ if (flags & M_WAITOK) {
KASSERT(curthread->td_intr_nesting_level == 0,
("malloc(M_WAITOK) in interrupt context"));
+ KASSERT_WARN(THREAD_CAN_SLEEP(),
+ ("malloc(M_WAITOK) in no_sleeping context"));
+ }
#ifdef DEBUG_MEMGUARD
if (memguard_cmp_mtp(mtp, size)) {
Index: sys/vm/uma_core.c
===================================================================
--- sys/vm/uma_core.c
+++ sys/vm/uma_core.c
@@ -2109,6 +2109,10 @@
if (flags & M_WAITOK) {
WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL,
"uma_zalloc_arg: zone \"%s\"", zone->uz_name);
+ KASSERT_WARN(curthread->td_intr_nesting_level == 0,
+ ("uma_zalloc_arg(M_WAITOK) in interrupt context"));
+ KASSERT_WARN(THREAD_CAN_SLEEP(),
+ ("uma_zalloc_arg(M_WAITOK) in no_sleeping context"));
}
#ifdef DEBUG_MEMGUARD
if (memguard_cmp_zone(zone)) {

File Metadata

Mime Type
text/plain
Expires
Thu, May 21, 12:12 AM (6 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33364779
Default Alt Text
D830.id1750.diff (1 KB)

Event Timeline