Re: LOCKDEP: possible irq lock inversion dependency detected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Thomas Gleixner <[email protected]> wrote:

> Hmm. That's the code in question:
> 
> void __init timekeeping_init(void)                                                                                                                    
> {                                                                                                                                                     
>         unsigned long flags;                                                                                                                          
>         unsigned long sec = read_persistent_clock();                                                                                                  
>                                                                                                                                                       
>         write_seqlock_irqsave(&xtime_lock, flags);  
> 
> The rtc_lock is never taken inside the xtime_lock.
> 
> Looks like code reordering due to gcc extra magic. Which compiler ?

i dont think it's due to code reordering. The code that lockdep flagged 
is the new code in arch/i386/kernel/bootflag.c, sbf_read() and 
sbf_write(). It does:

                spin_lock_irqsave(&rtc_lock, flags);
                CMOS_WRITE(v, sbf_port);
                spin_unlock_irqrestore(&rtc_lock, flags);

and:

        spin_lock_irqsave(&rtc_lock, flags);
        v = CMOS_READ(sbf_port);
        spin_unlock_irqrestore(&rtc_lock, flags);

and is apparently called with the xtime_lock held. Was that code ever 
booted with CONFIG_PROVE_LOCKING enabled?

	Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux