In testing a recent kernel patch using the debug kernel configs from the
Fedora rawhide kernel package, I didn't get any warnings about a case
where the code was performing a non-atomic kmalloc while holding a
spinlock, despite the fact that CONFIG_DEBUG_SPINLOCK_SLEEP was enabled.
In experimenting further, I found that I do get the warnings if I
switched from SLUB to SLAB (as mm/slab.c includes tests of might_sleep),
or if I use SLUB but enable DEBUG_PAGEALLOC as well (in which case the
warnings are emitted by the mm/page_alloc.c code). I also turned on
PREEMPT as per Documentation/SubmitChecklist for good measure.
Is this a known issue? Should the rawhide kernel debug config include
the necessary options to ensure that such warnings show up there?
National Security Agency
Show replies by date