SLAB_LEVEL_MASK question
From: Henry Qian
Date: Thu Sep 04 2003 - 13:22:41 EST
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, rather
than
* 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/