Staging
v0.5.1
https://github.com/torvalds/linux
Revision f2e12bb272f2544d1504f982270e90ae3dcc4ff2 authored by Christoph Lameter on 06 January 2007, 00:37:02 UTC, committed by Linus Torvalds on 06 January 2007, 07:55:29 UTC
Both process_zones() and drain_node_pages() check for populated zones
before touching pagesets.  However, __drain_pages does not do so,

This may result in a NULL pointer dereference for pagesets in unpopulated
zones if a NUMA setup is combined with cpu hotplug.

Initially the unpopulated zone has the pcp pointers pointing to the boot
pagesets.  Since the zone is not populated the boot pageset pointers will
not be changed during page allocator and slab bootstrap.

If a cpu is later brought down (first call to __drain_pages()) then the pcp
pointers for cpus in unpopulated zones are set to NULL since __drain_pages
does not first check for an unpopulated zone.

If the cpu is then brought up again then we call process_zones() which will
ignore the unpopulated zone.  So the pageset pointers will still be NULL.

If the cpu is then again brought down then __drain_pages will attempt to
drain pages by following the NULL pageset pointer for unpopulated zones.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 6929da4
History
Tip revision: f2e12bb272f2544d1504f982270e90ae3dcc4ff2 authored by Christoph Lameter on 06 January 2007, 00:37:02 UTC
[PATCH] Check for populated zone in __drain_pages
Tip revision: f2e12bb
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
scripts
security
sound
usr
.gitignore -rw-r--r-- 572 bytes
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 88.5 KB
Kbuild -rw-r--r-- 1.2 KB
MAINTAINERS -rw-r--r-- 78.9 KB
Makefile -rw-r--r-- 49.5 KB
README -rw-r--r-- 16.5 KB
REPORTING-BUGS -rw-r--r-- 3.0 KB

README

back to top