summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2011-02-20 22:05:20 -0500
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-02-20 22:05:20 -0500
commit348f94bbb939e2bf5a24495874e30de35076519e (patch)
tree49589bcab80be1364bb06491183c5f68337a981e
parent6b10a5b34a245ec3079362635b43d078c59da6c2 (diff)
downloadrt-patches-348f94bbb939e2bf5a24495874e30de35076519e.tar.gz
At the integration of RT onto v2.6.33-4252-g0a135ba, bad things happen, and __mmdrop_delayed oopses the kernel. Turns out that the removal of per_cpu__ from all the names of the percpu vars causes an implicit name conflict, where the percpu var gets shadowed by a local var with a poorly chosen (i.e. identical) name string. Add the cpu_ prefix to the local to indicate it is tied to the current CPU and is not meant to be the percpu one. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--cpu-hotplug-Don-t-wake-up-the-desched-thread-from-id.patch10
-rw-r--r--sched-mmdrop-needs-to-be-delayed-on-rt.patch12
2 files changed, 13 insertions, 9 deletions
diff --git a/cpu-hotplug-Don-t-wake-up-the-desched-thread-from-id.patch b/cpu-hotplug-Don-t-wake-up-the-desched-thread-from-id.patch
index 7a6d634..dfd6b81 100644
--- a/cpu-hotplug-Don-t-wake-up-the-desched-thread-from-id.patch
+++ b/cpu-hotplug-Don-t-wake-up-the-desched-thread-from-id.patch
@@ -79,15 +79,15 @@ index 6dc8e27..74192aa 100644
-void __mmdrop_delayed(struct mm_struct *mm)
+void __mmdrop_delayed(struct mm_struct *mm, int wake)
{
- struct task_struct *desched_task;
+ struct task_struct *cpu_desched_task;
struct list_head *head;
@@ -1839,7 +1841,7 @@ void __mmdrop_delayed(struct mm_struct *mm)
head = &get_cpu_var(delayed_drop_list);
list_add_tail(&mm->delayed_drop, head);
- desched_task = __get_cpu_var(desched_task);
-- if (desched_task)
-+ if (desched_task && wake)
- wake_up_process(desched_task);
+ cpu_desched_task = __get_cpu_var(desched_task);
+- if (cpu_desched_task)
++ if (cpu_desched_task && wake)
+ wake_up_process(cpu_desched_task);
put_cpu_var(delayed_drop_list);
}
@@ -1854,13 +1856,16 @@ static void takeover_delayed_drop(int hotcpu)
diff --git a/sched-mmdrop-needs-to-be-delayed-on-rt.patch b/sched-mmdrop-needs-to-be-delayed-on-rt.patch
index bf6b222..e8e97cf 100644
--- a/sched-mmdrop-needs-to-be-delayed-on-rt.patch
+++ b/sched-mmdrop-needs-to-be-delayed-on-rt.patch
@@ -5,6 +5,10 @@ Subject: [PATCH] sched: mmdrop needs to be delayed on -rt
commit 5b6e135f5e1e9e5586ad69e35c96494a4b413a00 in tip.
+[PG: upstream per_cpu__ prefix removal dd17c8f729) caused an implicit
+ (and hard to spot) shadowing of the percpu desched_task with a
+ local var of the same name in __mmdrop_delayed, so add cpu_ prefix]
+
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
@@ -154,14 +158,14 @@ index c12e53a..c49f839 100644
+ */
+void __mmdrop_delayed(struct mm_struct *mm)
+{
-+ struct task_struct *desched_task;
++ struct task_struct *cpu_desched_task;
+ struct list_head *head;
+
+ head = &get_cpu_var(delayed_drop_list);
+ list_add_tail(&mm->delayed_drop, head);
-+ desched_task = __get_cpu_var(desched_task);
-+ if (desched_task)
-+ wake_up_process(desched_task);
++ cpu_desched_task = __get_cpu_var(desched_task);
++ if (cpu_desched_task)
++ wake_up_process(cpu_desched_task);
+ put_cpu_var(delayed_drop_list);
+}
+