+ memory-page-alloc-minor-cleanups-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     memory page_alloc revert empty zonelist check

has been added to the -mm tree.  Its filename is

     memory-page-alloc-minor-cleanups-fix.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: memory page_alloc revert empty zonelist check
From: Paul Jackson <pj@xxxxxxx>

Backout one item from a previous "memory page_alloc minor cleanups" patch. 
Until and unless we are certain that no one can ever pass an empty zonelist
to __alloc_pages(), this check for an empty zonelist (or some BUG
equivalent) is essential.  The code in get_page_from_freelist() blow ups if
passed an empty zonelist.

Signed-off-by: Paul Jackson <pj@xxxxxxx>
Cc: Christoph Lameter <clameter@xxxxxxx>
Cc: Nick Piggin <nickpiggin@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 mm/page_alloc.c |    7 +++++++
 1 files changed, 7 insertions(+)

diff -puN mm/page_alloc.c~memory-page-alloc-minor-cleanups-fix mm/page_alloc.c
--- a/mm/page_alloc.c~memory-page-alloc-minor-cleanups-fix
+++ a/mm/page_alloc.c
@@ -993,6 +993,13 @@ __alloc_pages(gfp_t gfp_mask, unsigned i
 	might_sleep_if(wait);
 
 restart:
+	z = zonelist->zones;  /* the list of zones suitable for gfp_mask */
+
+	if (unlikely(*z == NULL)) {
+		/* Should this ever happen?? */
+		return NULL;
+	}
+
 	page = get_page_from_freelist(gfp_mask|__GFP_HARDWALL, order,
 				zonelist, ALLOC_WMARK_LOW|ALLOC_CPUSET);
 	if (page)
_

Patches currently in -mm which might be from pj@xxxxxxx are

mm-kevent-threads-use-mpol_default.patch
memory-page-alloc-minor-cleanups.patch
memory-page-alloc-minor-cleanups-fix.patch
bitmap-parse-input-from-kernel-and-user-buffers-2.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux