<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/lockdep.c, branch v2.6.19</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2006-11-17T19:10:37Z</updated>
<entry>
<title>[PATCH] lockdep: fix static keys in module-allocated percpu areas</title>
<updated>2006-11-17T19:10:37Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2006-11-17T18:57:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1ff5683043196b9ad628a5de6bf8eeca52ee8bfd'/>
<id>urn:sha1:1ff5683043196b9ad628a5de6bf8eeca52ee8bfd</id>
<content type='text'>
lockdep got confused by certain locks in modules:

 INFO: trying to register non-static key.
 the code is fine but needs lockdep annotation.
 turning off the locking correctness validator.

 Call Trace:
  [&lt;ffffffff8026f40d&gt;] dump_trace+0xaa/0x3f2
  [&lt;ffffffff8026f78f&gt;] show_trace+0x3a/0x60
  [&lt;ffffffff8026f9d1&gt;] dump_stack+0x15/0x17
  [&lt;ffffffff802abfe8&gt;] __lock_acquire+0x724/0x9bb
  [&lt;ffffffff802ac52b&gt;] lock_acquire+0x4d/0x67
  [&lt;ffffffff80267139&gt;] rt_spin_lock+0x3d/0x41
  [&lt;ffffffff8839ed3f&gt;] :ip_conntrack:__ip_ct_refresh_acct+0x131/0x174
  [&lt;ffffffff883a1334&gt;] :ip_conntrack:udp_packet+0xbf/0xcf
  [&lt;ffffffff8839f9af&gt;] :ip_conntrack:ip_conntrack_in+0x394/0x4a7
  [&lt;ffffffff8023551f&gt;] nf_iterate+0x41/0x7f
  [&lt;ffffffff8025946a&gt;] nf_hook_slow+0x64/0xd5
  [&lt;ffffffff802369a2&gt;] ip_rcv+0x24e/0x506
  [...]

Steven Rostedt found the bug: static_obj() check did not take
PERCPU_ENOUGH_ROOM into account, so in-module DEFINE_PER_CPU-area locks
were triggering this message.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Steven Rostedt &lt;srostedt@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input</title>
<updated>2006-10-17T15:56:43Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@g5.osdl.org</email>
</author>
<published>2006-10-17T15:56:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=43f82216f0bd114599f4a221ae6924f3658a0c9a'/>
<id>urn:sha1:43f82216f0bd114599f4a221ae6924f3658a0c9a</id>
<content type='text'>
* git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: fm801-gp - handle errors from pci_enable_device()
  Input: gameport core - handle errors returned by device_bind_driver()
  Input: serio core - handle errors returned by device_bind_driver()
  Lockdep: fix compile error in drivers/input/serio/serio.c
  Input: serio - add lockdep annotations
  Lockdep: add lockdep_set_class_and_subclass() and lockdep_set_subclass()
  Input: atkbd - supress "too many keys" error message
  Input: i8042 - supress ACK/NAKs when blinking during panic
  Input: add missing exports to fix modular build
</content>
</entry>
<entry>
<title>[PATCH] lockdep: increase max allowed recursion depth</title>
<updated>2006-10-17T15:18:42Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2006-10-17T07:09:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ca268c691de95612981b93e58899c1d73fdb6b47'/>
<id>urn:sha1:ca268c691de95612981b93e58899c1d73fdb6b47</id>
<content type='text'>
In general, lockdep warnings are intended to be non-fatal, so I have put in
various practical limits on internal data structure failure modes.  We haven't
had a /single/ lockdep-internal crash ever since lockdep went upstream [the
unwinder crashes are outside of lockdep], and that's largely due to the good
internal checks it does.

Recursion within the dependency graph is currently limited to 20, that's
probably not enough on some many-CPU boxes - this patch doubles it to 40.  I
have written the lockdep functions to have as small stackframes as possible,
so 40 should be OK too.  (The practical recursion limit should be somewhere
between 100 and 200 entries.  If we hit that then I'll change the algorithm to
be iteration-based.  Graph walking logic is so easy to program via recursion,
so i'd like to keep recursion as long as possible.)

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] lockdep: use BUILD_BUG_ON</title>
<updated>2006-10-11T18:14:24Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2006-10-11T08:22:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3dc3099a9b2c346b16383597fadaa79a05a52388'/>
<id>urn:sha1:3dc3099a9b2c346b16383597fadaa79a05a52388</id>
<content type='text'>
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>Lockdep: add lockdep_set_class_and_subclass() and lockdep_set_subclass()</title>
<updated>2006-10-11T05:45:14Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2006-10-11T05:45:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4dfbb9d8c6cbfc32faa5c71145bd2a43e1f8237c'/>
<id>urn:sha1:4dfbb9d8c6cbfc32faa5c71145bd2a43e1f8237c</id>
<content type='text'>
This annotation makes it possible to assign a subclass on lock init. This
annotation is meant to reduce the _nested() annotations by assigning a
default subclass.

One could do without this annotation and rely on lockdep_set_class()
exclusively, but that would require a manual stack of struct lock_class_key
objects.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
</entry>
<entry>
<title>[PATCH] namespaces: utsname: use init_utsname when appropriate</title>
<updated>2006-10-02T14:57:21Z</updated>
<author>
<name>Serge E. Hallyn</name>
<email>serue@us.ibm.com</email>
</author>
<published>2006-10-02T09:18:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=96b644bdec977b97a45133e5b4466ba47a7a5e65'/>
<id>urn:sha1:96b644bdec977b97a45133e5b4466ba47a7a5e65</id>
<content type='text'>
In some places, particularly drivers and __init code, the init utsns is the
appropriate one to use.  This patch replaces those with a the init_utsname
helper.

Changes: Removed several uses of init_utsname().  Hope I picked all the
	right ones in net/ipv4/ipconfig.c.  These are now changed to
	utsname() (the per-process namespace utsname) in the previous
	patch (2/7)

[akpm@osdl.org: CIFS fix]
Signed-off-by: Serge E. Hallyn &lt;serue@us.ibm.com&gt;
Cc: Kirill Korotaev &lt;dev@openvz.org&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Herbert Poetzl &lt;herbert@13thfloor.at&gt;
Cc: Andrey Savochkin &lt;saw@sw.ru&gt;
Cc: Serge Hallyn &lt;serue@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] lockdep core: improve the lock-chain-hash</title>
<updated>2006-09-29T16:18:25Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2006-09-29T09:01:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=03cbc358aab3faf34bfeaa02206fa660127e9b3f'/>
<id>urn:sha1:03cbc358aab3faf34bfeaa02206fa660127e9b3f</id>
<content type='text'>
With CONFIG_DEBUG_LOCK_ALLOC turned off i was getting sporadic failures in
the locking self-test:

  ------------&gt;
  | Locking API testsuite:
  ----------------------------------------------------------------------------
                                   | spin |wlock |rlock |mutex | wsem | rsem |
    --------------------------------------------------------------------------
                       A-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
                   A-B-B-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
               A-B-B-C-C-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
               A-B-C-A-B-C deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
           A-B-B-C-C-D-D-A deadlock:  ok  |FAILED|  ok  |  ok  |  ok  |  ok  |
           A-B-C-D-B-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
           A-B-C-D-B-C-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |FAILED|

after much debugging it turned out to be caused by accidental chain-hash
key collisions.  The current hash is:

 #define iterate_chain_key(key1, key2) \
	(((key1) &lt;&lt; MAX_LOCKDEP_KEYS_BITS/2) ^ \
	((key1) &gt;&gt; (64-MAX_LOCKDEP_KEYS_BITS/2)) ^ \
 	(key2))

where MAX_LOCKDEP_KEYS_BITS is 11.  This hash is pretty good as it will
shift by 5 bits in every iteration, where every new ID 'mixed' into the
hash would have up to 11 bits.  But because there was a 6 bits overlap
between subsequent IDs and their high bits tended to be similar, there was
a chance for accidental chain-hash collision for a low number of locks
held.

the solution is to shift by 11 bits:

 #define iterate_chain_key(key1, key2) \
	(((key1) &lt;&lt; MAX_LOCKDEP_KEYS_BITS) ^ \
	((key1) &gt;&gt; (64-MAX_LOCKDEP_KEYS_BITS)) ^ \
 	(key2))

This keeps the hash perfect up to 5 locks held, but even above that the
hash is still good because 11 bits is a relative prime to the total 64
bits, so a complete match will only occur after 64 held locks (which doesnt
happen in Linux).  Even after 5 locks held, entropy of the 5 IDs mixed into
the hash is already good enough so that overlap doesnt generate a colliding
hash ID.

with this change the false positives went away.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] lockdep: print kernel version</title>
<updated>2006-09-29T16:18:13Z</updated>
<author>
<name>Dave Jones</name>
<email>davej@redhat.com</email>
</author>
<published>2006-09-29T09:00:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=99de055ac065e19ed69de961e97c6336a261b34e'/>
<id>urn:sha1:99de055ac065e19ed69de961e97c6336a261b34e</id>
<content type='text'>
Lets do the same thing we do for oopses - print out the version in the
report.  It's an extra line of output though.  We could tack it on the end
of the INFO: lines, but that screws up Ingo's pretty output.

Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Avoid recursion in lockdep when stack tracer takes locks</title>
<updated>2006-09-26T08:52:34Z</updated>
<author>
<name>Andi Kleen</name>
<email>ak@suse.de</email>
</author>
<published>2006-09-26T08:52:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3fa7c794fe4dc127f7fac3fad4d13628e68f89ce'/>
<id>urn:sha1:3fa7c794fe4dc127f7fac3fad4d13628e68f89ce</id>
<content type='text'>
The new dwarf2 unwinder needs to take locks to do backtraces
inside modules. This patch makes sure lockdep which calls
stacktrace is not reentered.

Thanks to Ingo for suggesting this simpler approach.

Cc: mingo@elte.hu
Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] x86: Some preparationary cleanup for stack trace</title>
<updated>2006-09-26T08:52:34Z</updated>
<author>
<name>Andi Kleen</name>
<email>ak@suse.de</email>
</author>
<published>2006-09-26T08:52:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5a1b3999d6cb7ab87f1f3b1700bc91839fd6fa29'/>
<id>urn:sha1:5a1b3999d6cb7ab87f1f3b1700bc91839fd6fa29</id>
<content type='text'>
- Remove unused all_contexts parameter
No caller used it
- Move skip argument into the structure (needed for
followon patches)

Cc: mingo@elte.hu

Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
</content>
</entry>
</feed>
