Re: lockdep internal warning in linux-next

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ingo Molnar
Date: Monday, June 9, 2008 - 1:39 am

* Andrew Morton <akpm@linux-foundation.org> wrote:


this is probably the same as the known problem fixed by the patch below.

	Ingo

----------------->
Subject: sched: sched_clock() lockdep fix
From: Ingo Molnar <mingo@elte.hu>
Date: Thu Jun 05 15:04:17 CEST 2008

Sitsofe Wheeler reported a lockdep warning and bisected it down to:


do not use raw irq flags in cpu_clock() as it causes lockdep to lose
track of the true state of the IRQ flag.

Reported-and-bisected-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/sched.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux/kernel/sched.c
===================================================================
--- linux.orig/kernel/sched.c
+++ linux/kernel/sched.c
@@ -862,7 +862,7 @@ unsigned long long notrace cpu_clock(int
 	unsigned long long prev_cpu_time, time, delta_time;
 	unsigned long flags;
 
-	raw_local_irq_save(flags);
+	local_irq_save(flags);
 	prev_cpu_time = per_cpu(prev_cpu_time, cpu);
 	time = __cpu_clock(cpu) + per_cpu(time_offset, cpu);
 	delta_time = time-prev_cpu_time;
@@ -871,7 +871,7 @@ unsigned long long notrace cpu_clock(int
 		time = __sync_cpu_clock(time, cpu);
 		per_cpu(prev_cpu_time, cpu) = time;
 	}
-	raw_local_irq_restore(flags);
+	local_irq_restore(flags);
 
 	return time;
 }
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
lockdep internal warning in linux-next, Andrew Morton, (Mon Jun 9, 1:09 am)
Re: lockdep internal warning in linux-next, Ingo Molnar, (Mon Jun 9, 1:39 am)