* [PATCH] stop NULL pointer dereference in __alloc_pages
@ 2002-04-18 22:38 Martin J. Bligh
0 siblings, 0 replies; only message in thread
From: Martin J. Bligh @ 2002-04-18 22:38 UTC (permalink / raw)
To: Marcelo Tosatti, Linus Torvalds; +Cc: linux-kernel
This trivial patch will apply to both 2.4.19-pre7 and 2.5.8 with just line
offsets. It stops us from following a NULL pointer in classzone in the case
where there is a pgdat without a fully populated zone list (ie a node with
no ZONE_NORMAL on an ia32 NUMA machine). Without this patch, ia32
NUMA machines won't even boot - we dereference the classzone ptr
a few lines further down (or try to ;-) ).
Please apply ...
Thanks,
Martin.
--- linux-2.4.18-memalloc/mm/page_alloc.c.old Fri Mar 8 18:21:41 2002
+++ linux-2.4.18-memalloc/mm/page_alloc.c Fri Mar 8 18:23:27 2002
@@ -317,6 +317,8 @@
zone = zonelist->zones;
classzone = *zone;
+ if (classzone == NULL)
+ return NULL;
min = 1UL << order;
for (;;) {
zone_t *z = *(zone++);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-04-18 21:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-18 22:38 [PATCH] stop NULL pointer dereference in __alloc_pages Martin J. Bligh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.