From: Jonathan Corbet <corbet@lwn.net>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org
Subject: [PATCH,RFC] Add __GFP_ZERO to GFP_LEVEL_MASK
Date: Fri, 13 Oct 2006 14:25:16 -0600 [thread overview]
Message-ID: <28729.1160771116@lwn.net> (raw)
There is a very helpful comment in <linux/gfp.h>:
/* if you forget to add the bitmask here kernel will crash, period */
Well, my kernel has been crashing (period) at the BUG() in cache_grow();
the offending flag is __GFP_ZERO. I think it needs to be in
GFP_LEVEL_MASK. Anybody know a good reason why it's not there now?
jon
Add __GFP_ZERO to GFP_LEVEL_MASK and cut down on those unsightly oopses.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
--- /k/t/2.6.19-rc2/include/linux/gfp.h 2006-10-13 13:04:17.000000000 -0600
+++ 19-rc2.jc/include/linux/gfp.h 2006-10-13 14:17:10.000000000 -0600
@@ -54,7 +54,8 @@ struct vm_area_struct;
#define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \
__GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \
__GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \
- __GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_THISNODE)
+ __GFP_ZERO|__GFP_NOMEMALLOC|__GFP_HARDWALL|\
+ __GFP_THISNODE)
/* This equals 0, but use constants in case they ever change */
#define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH)
next reply other threads:[~2006-10-13 20:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-13 20:25 Jonathan Corbet [this message]
2006-10-13 20:46 ` Andrew Morton
2006-10-13 21:00 ` Jonathan Corbet
2006-10-13 21:31 ` Andrew Morton
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=28729.1160771116@lwn.net \
--to=corbet@lwn.net \
--cc=akpm@osdl.org \
--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®