]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.6-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Nov 2012 07:57:20 +0000 (23:57 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Nov 2012 07:57:20 +0000 (23:57 -0800)
added patches:
mm-bugfix-set-current-reclaim_state-to-null-while-returning-from-kswapd.patch

queue-3.6/mm-bugfix-set-current-reclaim_state-to-null-while-returning-from-kswapd.patch [new file with mode: 0644]
queue-3.6/series [new file with mode: 0644]

diff --git a/queue-3.6/mm-bugfix-set-current-reclaim_state-to-null-while-returning-from-kswapd.patch b/queue-3.6/mm-bugfix-set-current-reclaim_state-to-null-while-returning-from-kswapd.patch
new file mode 100644 (file)
index 0000000..ce6a9f9
--- /dev/null
@@ -0,0 +1,38 @@
+From b0a8cc58e6b9aaae3045752059e5e6260c0b94bc Mon Sep 17 00:00:00 2001
+From: Takamori Yamaguchi <takamori.yamaguchi@jp.sony.com>
+Date: Thu, 8 Nov 2012 15:53:39 -0800
+Subject: mm: bugfix: set current->reclaim_state to NULL while returning from kswapd()
+
+From: Takamori Yamaguchi <takamori.yamaguchi@jp.sony.com>
+
+commit b0a8cc58e6b9aaae3045752059e5e6260c0b94bc upstream.
+
+In kswapd(), set current->reclaim_state to NULL before returning, as
+current->reclaim_state holds reference to variable on kswapd()'s stack.
+
+In rare cases, while returning from kswapd() during memory offlining,
+__free_slab() and freepages() can access the dangling pointer of
+current->reclaim_state.
+
+Signed-off-by: Takamori Yamaguchi <takamori.yamaguchi@jp.sony.com>
+Signed-off-by: Aaditya Kumar <aaditya.kumar@ap.sony.com>
+Acked-by: David Rientjes <rientjes@google.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ mm/vmscan.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/mm/vmscan.c
++++ b/mm/vmscan.c
+@@ -2953,6 +2953,8 @@ static int kswapd(void *p)
+                                               &balanced_classzone_idx);
+               }
+       }
++
++      current->reclaim_state = NULL;
+       return 0;
+ }
diff --git a/queue-3.6/series b/queue-3.6/series
new file mode 100644 (file)
index 0000000..32b3a24
--- /dev/null
@@ -0,0 +1 @@
+mm-bugfix-set-current-reclaim_state-to-null-while-returning-from-kswapd.patch