Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2010-04-12 12:15:25 +0200
committerMiklos Szeredi <mszeredi@suse.cz>2010-04-12 12:15:25 +0200
commit76403729ad68394d5d17f0419fbcd811f9280816 (patch)
treeed70530f2968126a0db5177cbff5b18d42e9621e
parent6494b88e0ba7964bfaa7e141397c6a83a704902c (diff)
- patches.fixes/mempolicy-fix-get_mempolicy-for-relative-and-static-nodes.patch:
mempolicy: fix get_mempolicy() for relative and static nodes (bnc#594305).
-rw-r--r--kernel-source.changes7
-rw-r--r--patches.fixes/mempolicy-fix-get_mempolicy-for-relative-and-static-nodes.patch44
-rw-r--r--series.conf1
3 files changed, 52 insertions, 0 deletions
diff --git a/kernel-source.changes b/kernel-source.changes
index 1eeb5788a3..8420973101 100644
--- a/kernel-source.changes
+++ b/kernel-source.changes
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Mon Apr 12 12:15:11 CEST 2010 - mszeredi@suse.cz
+
+- patches.fixes/mempolicy-fix-get_mempolicy-for-relative-and-static-nodes.patch:
+ mempolicy: fix get_mempolicy() for relative and static nodes
+ (bnc#594305).
+
+-------------------------------------------------------------------
Mon Apr 12 10:43:27 CEST 2010 - hare@suse.de
- patches.drivers/hpsa-only-unmap-buffer-when-allocated: hpsa:
diff --git a/patches.fixes/mempolicy-fix-get_mempolicy-for-relative-and-static-nodes.patch b/patches.fixes/mempolicy-fix-get_mempolicy-for-relative-and-static-nodes.patch
new file mode 100644
index 0000000000..8abbcb9acc
--- /dev/null
+++ b/patches.fixes/mempolicy-fix-get_mempolicy-for-relative-and-static-nodes.patch
@@ -0,0 +1,44 @@
+From: Lee Schermerhorn <lee.schermerhorn@hp.com>
+Subject: mempolicy: fix get_mempolicy() for relative and static nodes
+Patch-mainline: yes
+References: bnc#594305
+commit c6b6ef8bb05af632889c5536513b9f4004961f73
+Date: Tue Mar 23 13:35:41 2010 -0700
+
+Discovered while testing other mempolicy changes:
+
+get_mempolicy() does not handle static/relative mode flags correctly.
+Return the value that the user specified so that it can be restored
+via set_mempolicy() if desired.
+
+Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
+Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
+Cc: Ravikiran Thirumalai <kiran@scalex86.org>
+Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
+Cc: Christoph Lameter <cl@linux-foundation.org>
+Cc: David Rientjes <rientjes@google.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Acked-by: Miklos Szeredi <mszeredi@suse.cz>
+
+diff --git a/mm/mempolicy.c b/mm/mempolicy.c
+index 6cdfa1d..8034abd 100644
+--- a/mm/mempolicy.c
++++ b/mm/mempolicy.c
+@@ -806,9 +806,13 @@ static long do_get_mempolicy(int *policy, nodemask_t *nmask,
+
+ err = 0;
+ if (nmask) {
+- task_lock(current);
+- get_policy_nodemask(pol, nmask);
+- task_unlock(current);
++ if (mpol_store_user_nodemask(pol)) {
++ *nmask = pol->w.user_nodemask;
++ } else {
++ task_lock(current);
++ get_policy_nodemask(pol, nmask);
++ task_unlock(current);
++ }
+ }
+
+ out:
diff --git a/series.conf b/series.conf
index 3476b68130..362ab04225 100644
--- a/series.conf
+++ b/series.conf
@@ -560,6 +560,7 @@
patches.fixes/mm-pagealloc-fix-congestion-wait.patch
patches.suse/mm-uninline-add-to-page-cache.patch
patches.suse/pagecache-limit.patch
+ patches.fixes/mempolicy-fix-get_mempolicy-for-relative-and-static-nodes.patch
########################################################
# IPC patches