[kernel/f14/master] fix rcu_dereference_check warning
Kyle McMartin
kyle at fedoraproject.org
Mon Sep 6 18:23:17 UTC 2010
commit cfdae029cc721afae80da35f6fad2383f0386435
Author: Kyle McMartin <kyle at dreadnought.i.jkkm.org>
Date: Mon Sep 6 14:22:48 2010 -0400
fix rcu_dereference_check warning
fix-rcu_deref_check-warning.patch | 27 +++++++++++++++++++++++++++
kernel.spec | 10 ++++++++++
2 files changed, 37 insertions(+), 0 deletions(-)
---
diff --git a/fix-rcu_deref_check-warning.patch b/fix-rcu_deref_check-warning.patch
new file mode 100644
index 0000000..12199d4
--- /dev/null
+++ b/fix-rcu_deref_check-warning.patch
@@ -0,0 +1,27 @@
+diff --git a/kernel/sched.c b/kernel/sched.c
+index 6d0dbeb..3640c20 100644
+--- a/kernel/sched.c
++++ b/kernel/sched.c
+@@ -5155,9 +5155,11 @@ void __cpuinit init_idle_bootup_task(struct task_struct *idle)
+ void __cpuinit init_idle(struct task_struct *idle, int cpu)
+ {
+ struct rq *rq = cpu_rq(cpu);
++ struct rq *oldrq = task_rq(idle);
+ unsigned long flags;
+
+- raw_spin_lock_irqsave(&rq->lock, flags);
++ local_irq_save(flags);
++ double_rq_lock(oldrq, rq);
+
+ __sched_fork(idle);
+ idle->state = TASK_RUNNING;
+@@ -5170,7 +5172,8 @@ void __cpuinit init_idle(struct task_struct *idle, int cpu)
+ #if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW)
+ idle->oncpu = 1;
+ #endif
+- raw_spin_unlock_irqrestore(&rq->lock, flags);
++ double_rq_unlock(oldrq, rq);
++ local_irq_restore(flags);
+
+ /* Set the preempt count _outside_ the spinlocks! */
+ #if defined(CONFIG_PREEMPT)
diff --git a/kernel.spec b/kernel.spec
index afebac7..d4445c6 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -712,6 +712,9 @@ Patch12070: xfs-move-aio-completion-after-unwritten-extent-conversion.patch
Patch12080: kprobes-x86-fix-kprobes-to-skip-prefixes-correctly.patch
+# rhbz #622149
+Patch12085: fix-rcu_deref_check-warning.patch
+
%endif
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1314,6 +1317,9 @@ ApplyPatch xfs-move-aio-completion-after-unwritten-extent-conversion.patch
# bz 610941
ApplyPatch kprobes-x86-fix-kprobes-to-skip-prefixes-correctly.patch
+# bz 622149
+ApplyPatch fix-rcu_deref_check-warning.patch
+
# END OF PATCH APPLICATIONS
%endif
@@ -1900,6 +1906,10 @@ fi
# and build.
%changelog
+* Mon Sep 06 2010 Kyle McMartin <kyle at redhat.com>
+- Patch from paulmck to fix rcu_dereference_check warning
+ (http://lkml.org/lkml/2010/8/16/258)
+
* Mon Sep 06 2010 Jarod Wilson <jarod at redhat.com> 2.6.35.4-20
- Restore the rest of the appleir driver patch
More information about the scm-commits
mailing list