Messages in this thread | ![/](/images/icornerl.gif) | | Subject | SLAB_LEVEL_MASK question | Date | Thu, 4 Sep 2003 14:18:15 -0400 | From | "Henry Qian" <> |
| |
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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |