From: "Henry Qian" <henry@amperion.com>
To: <linux-kernel@vger.kernel.org>
Subject: SLAB_LEVEL_MASK question
Date: Thu, 4 Sep 2003 14:18:15 -0400 [thread overview]
Message-ID: <C6D44AA99ECEB540A5498F15F92DA07DCF0DB0@amperion01> (raw)
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
next reply other threads:[~2003-09-04 18:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-04 18:18 Henry Qian [this message]
2003-09-04 19:49 Manfred Spraul
2003-09-04 20:19 Henry Qian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C6D44AA99ECEB540A5498F15F92DA07DCF0DB0@amperion01 \
--to=henry@amperion.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®