From: Manfred Spraul <manfred@colorfullife.com>
To: "Henry Qian" <henry@amperion.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: SLAB_LEVEL_MASK question
Date: Thu, 04 Sep 2003 21:49:59 +0200 [thread overview]
Message-ID: <3F579767.8030806@colorfullife.com> (raw)
Hi Henry,
>The kernel panics because in the flags variable, I have other flags
>(0x1f0) besides SLAB_ATOMIC.
>
>
Which flags were set? __GFP_WAIT must not be set [i.e. will panic], the
other combinations are invalid. The only legal values for the flags
variable are 0 or SLAB_ATOMIC [aka GFP_ATOMIC, aka __GFP_HIGH].
>I modified it to:
>
> if (in_interrupt() && (flags & SLAB_ATOMIC) != SLAB_ATOMIC)
> BUG();
>
>It seems working fine.
>
>Is this good?
>
>
No, it's wrong. Your driver will panic once in a while, especially under
memory intensive stress tests.
--
Manfred
next reply other threads:[~2003-09-04 19:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-04 19:49 Manfred Spraul [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-09-04 20:19 SLAB_LEVEL_MASK question Henry Qian
2003-09-04 18:18 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=3F579767.8030806@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=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