Commit 7ba1c6c8 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] get_cmos_time() locking fix (lockdep)

rtc_lock is supposed to be irq-safe.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 11eebe30
......@@ -206,15 +206,16 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
unsigned long get_cmos_time(void)
{
unsigned long retval;
unsigned long flags;
spin_lock(&rtc_lock);
spin_lock_irqsave(&rtc_lock, flags);
if (efi_enabled)
retval = efi_get_time();
else
retval = mach_get_cmos_time();
spin_unlock(&rtc_lock);
spin_unlock_irqrestore(&rtc_lock, flags);
return retval;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment