lkml.org 
[lkml]   [2003]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectSLAB_LEVEL_MASK question
Date
From
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/

\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.039 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site