Fix the td_intr_nesting_level check to work ok if a flag like M_ZERO is
passed in with M_WAITOK to malloc().
This commit is contained in:
parent
85e17a3398
commit
bb678d578d
@ -157,11 +157,9 @@ malloc(size, type, flags)
|
||||
if (size == 0)
|
||||
Debugger("zero size malloc");
|
||||
#endif
|
||||
#if defined(INVARIANTS)
|
||||
if (flags == M_WAITOK)
|
||||
if (!(flags & M_NOWAIT))
|
||||
KASSERT(curthread->td_intr_nesting_level == 0,
|
||||
("malloc(M_WAITOK) in interrupt context"));
|
||||
#endif
|
||||
if (size <= KMEM_ZMAX) {
|
||||
if (size & KMEM_ZMASK)
|
||||
size = (size & ~KMEM_ZMASK) + KMEM_ZBASE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user