lkml.org 
[lkml]   [2009]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] [3/16] POISON: Handle poisoned pages in page free
Date

Make sure no poisoned pages are put back into the free page
lists. This can happen with some races.

This is allo slow path in the bad page bits path, so another
check doesn't really matter.

Signed-off-by: Andi Kleen <ak@linux.intel.com>

---
mm/page_alloc.c | 9 +++++++++
1 file changed, 9 insertions(+)

Index: linux/mm/page_alloc.c
===================================================================
--- linux.orig/mm/page_alloc.c 2009-04-07 16:39:26.000000000 +0200
+++ linux/mm/page_alloc.c 2009-04-07 16:39:39.000000000 +0200
@@ -228,6 +228,15 @@
static unsigned long nr_unshown;

/*
+ * Page may have been marked bad before process is freeing it.
+ * Make sure it is not put back into the free page lists.
+ */
+ if (PagePoison(page)) {
+ /* check more flags here... */
+ return;
+ }
+
+ /*
* Allow a burst of 60 reports, then keep quiet for that minute;
* or allow a steady drip of one report per second.
*/

\
 
 \ /
  Last update: 2009-04-07 17:25    [W:0.329 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site