SLAB_LEVEL_MASK question
I had a kernel panic at:
static int kmem_cache_grow (kmem_cache_t * cachep, int flags)
{
.....
/*
* The test for missing atomic flag is performed here, ratherthan
* the more obvious place, simply to reduce the critical path
length
* in kmem_cache_alloc(). If a caller is seriously mis-behaving
they
* will eventually be caught here (where it matters).
*/
if (in_interrupt() && (flags & SLAB_LEVEL_MASK) != SLAB_ATOMIC)
BUG();
...
}The kernel panics because in the flags variable, I have other flags (0x1f0) besides SLAB_ATOMIC.
I modified it to:
if (in_interrupt() && (flags & SLAB_ATOMIC) != SLAB_ATOMIC)
BUG();It seems working fine.
Is this good?
Henry Qian