Skip to content

Commit

Permalink
[PATCH] Doc/lockdep-design: explain display of {state-bits}
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Jim Cromie authored and Linus Torvalds committed Oct 1, 2006
1 parent ce584f9 commit fd7bcea
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Documentation/lockdep-design.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,28 @@ The validator tracks lock-class usage history into 5 separate state bits:

- 'ever used' [ == !unused ]

When locking rules are violated, these 4 state bits are presented in the
locking error messages, inside curlies. A contrived example:

modprobe/2287 is trying to acquire lock:
(&sio_locks[i].lock){--..}, at: [<c02867fd>] mutex_lock+0x21/0x24

but task is already holding lock:
(&sio_locks[i].lock){--..}, at: [<c02867fd>] mutex_lock+0x21/0x24


The bit position indicates hardirq, softirq, hardirq-read,
softirq-read respectively, and the character displayed in each
indicates:

'.' acquired while irqs enabled
'+' acquired in irq context
'-' acquired in process context with irqs disabled
'?' read-acquired both with irqs enabled and in irq context

Unused mutexes cannot be part of the cause of an error.


Single-lock state rules:
------------------------

Expand Down

0 comments on commit fd7bcea

Please sign in to comment.