lkml.org 
[lkml]   [2002]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] stop NULL pointer dereference in __alloc_pages
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++);
-
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:25    [W:2.114 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site