From cfdae029cc721afae80da35f6fad2383f0386435 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Mon, 6 Sep 2010 14:22:48 -0400 Subject: [PATCH] fix rcu_dereference_check warning --- fix-rcu_deref_check-warning.patch | 27 +++++++++++++++++++++++++++ kernel.spec | 10 ++++++++++ 2 files changed, 37 insertions(+) create mode 100644 fix-rcu_deref_check-warning.patch diff --git a/fix-rcu_deref_check-warning.patch b/fix-rcu_deref_check-warning.patch new file mode 100644 index 000000000..12199d470 --- /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 afebac71c..d4445c694 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 +- Patch from paulmck to fix rcu_dereference_check warning + (http://lkml.org/lkml/2010/8/16/258) + * Mon Sep 06 2010 Jarod Wilson 2.6.35.4-20 - Restore the rest of the appleir driver patch