Re: Need lockdep help

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

 



Alan Stern wrote, On 12/04/2007 08:28 PM:

> On Tue, 4 Dec 2007, Jarek Poplawski wrote:

...

> But you have to consider hypothetical kernel bugs.  That's exactly what 
> lockdep is for -- to warn you about possible deadlocks that could be 
> caused by bugs.
> 
> As a simple example, if thread #1 does "lock(A); lock(B)" and thread 
> #2 does "lock(B); lock(A)" then there's a possible bug.  Lockdep should 
> warn about you, and it does -- even if those two threads can never run 
> at the same time.
> 
> If lockdep warned about deadlocks only when they actually happened, it 
> wouldn't be nearly so useful.


Sure! I probably missed your point... Lockdep always names reported locks,
so I meant 'hypothetical' only trying to explain lockdep with some other,
unknown or unnamed bugs.

So, depending on the code, above example with A & B could be a real bug
(even if very improbable but logically justified) or a false alarm (eg.
when we know both threads could never work at the same).

Jarek P.
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux