<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/lockdep.c, branch v2.6.24</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.24</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.24'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2008-01-24T16:01:09Z</updated>
<entry>
<title>lockdep: fix kernel crash on module unload</title>
<updated>2008-01-24T16:01:09Z</updated>
<author>
<name>Arjan van de Ven</name>
<email>arjan@linux.intel.com</email>
</author>
<published>2008-01-24T06:00:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fabe874a48de45b137f99b4ed3641e0413f465ce'/>
<id>urn:sha1:fabe874a48de45b137f99b4ed3641e0413f465ce</id>
<content type='text'>
Michael Wu noticed in his lkml post at

    http://marc.info/?l=linux-kernel&amp;m=119396182726091&amp;w=2

that certain wireless drivers ended up having their name in module
memory, which would then crash the kernel on module unload.

The patch he proposed was a bit clumsy in that it increased the size of
a lockdep entry significantly; the patch below tries another approach,
it checks, on module teardown, if the name of a class is in module space
and then zaps the class.  This is very similar to what we already do
with keys that are in module space.

Signed-off-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lockdep: fix internal double unlock during self-test</title>
<updated>2008-01-16T08:51:58Z</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2008-01-16T08:51:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5a26db5bd25cf4bf32ae9fa9f6136b6b6d5b45c5'/>
<id>urn:sha1:5a26db5bd25cf4bf32ae9fa9f6136b6b6d5b45c5</id>
<content type='text'>
Lockdep, during self-test (when it was simulating double unlocks) was
sometimes unconditionally unlocking a spinlock when it had not been
locked. This won't work for ticket locks.

Signed-off-by: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
</content>
</entry>
<entry>
<title>lockdep: make cli/sti annotation warnings clearer</title>
<updated>2007-12-07T18:02:47Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2007-12-07T18:02:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5f9fa8a62d6a98f5cb2ee2e00b85bfe95e45888d'/>
<id>urn:sha1:5f9fa8a62d6a98f5cb2ee2e00b85bfe95e45888d</id>
<content type='text'>
make cli/sti annotation warnings easier to interpret.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
</content>
</entry>
<entry>
<title>lockdep: in_range() fix</title>
<updated>2007-12-05T14:46:09Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2007-12-05T14:46:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=54561783ee99d73a086f3abbda3e44f87f6bf65b'/>
<id>urn:sha1:54561783ee99d73a086f3abbda3e44f87f6bf65b</id>
<content type='text'>
Torsten Kaiser wrote:

| static inline int in_range(const void *start, const void *addr, const void *end)
| {
|         return addr &gt;= start &amp;&amp; addr &lt;= end;
| }
| This  will return true, if addr is in the range of start (including)
| to end (including).
|
| But debug_check_no_locks_freed() seems does:
| const void *mem_to = mem_from + mem_len
| -&gt; mem_to is the last byte of the freed range, that fits in_range
| lock_from = (void *)hlock-&gt;instance;
| -&gt; first byte of the lock
| lock_to = (void *)(hlock-&gt;instance + 1);
| -&gt; first byte of the next lock, not last byte of the lock that is being checked!
|
| The test is:
| if (!in_range(mem_from, lock_from, mem_to) &amp;&amp;
|                                         !in_range(mem_from, lock_to, mem_to))
|                         continue;
| So it tests, if the first byte of the lock is in the range that is freed -&gt;OK
| And if the first byte of the *next* lock is in the range that is freed
| -&gt; Not OK.

We can also simplify in_range checks, we need only 2 comparisons, not 4.
If the lock is not in memory range, it should be either at the left of range
or at the right.

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
</content>
</entry>
<entry>
<title>lockdep: fix debug_show_all_locks()</title>
<updated>2007-12-05T14:46:09Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2007-12-05T14:46:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=856848737bd944c1db3ce0a66bbf67e56bd6f77d'/>
<id>urn:sha1:856848737bd944c1db3ce0a66bbf67e56bd6f77d</id>
<content type='text'>
fix the oops that can be seen in:

   http://bugzilla.kernel.org/attachment.cgi?id=13828&amp;action=view

it is not safe to print the locks of running tasks.

(even with this fix we have a small race - but this is a debug
 function after all.)

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
</content>
</entry>
<entry>
<title>lockdep: fix a typo in the __lock_acquire comment</title>
<updated>2007-10-28T19:47:01Z</updated>
<author>
<name>Gautham R Shenoy</name>
<email>ego@in.ibm.com</email>
</author>
<published>2007-10-28T19:47:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=17aacfb9cdf9a8329a6ece9c437551a29c93e47b'/>
<id>urn:sha1:17aacfb9cdf9a8329a6ece9c437551a29c93e47b</id>
<content type='text'>
Fix a typo in the __lock_acquire comment.

Signed-off-by: Gautham R Shenoy &lt;ego@in.ibm.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>Use helpers to obtain task pid in printks</title>
<updated>2007-10-19T18:53:43Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@openvz.org</email>
</author>
<published>2007-10-19T06:40:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ba25f9dcc4ea6e30839fcab5a5516f2176d5bfed'/>
<id>urn:sha1:ba25f9dcc4ea6e30839fcab5a5516f2176d5bfed</id>
<content type='text'>
The task_struct-&gt;pid member is going to be deprecated, so start
using the helpers (task_pid_nr/task_pid_vnr/task_pid_nr_ns) in
the kernel.

The first thing to start with is the pid, printed to dmesg - in
this case we may safely use task_pid_nr(). Besides, printks produce
more (much more) than a half of all the explicit pid usage.

[akpm@linux-foundation.org: git-drm went and changed lots of stuff]
Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Cc: Dave Airlie &lt;airlied@linux.ie&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>workqueue: debug flushing deadlocks with lockdep</title>
<updated>2007-10-19T18:53:38Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes@sipsolutions.net</email>
</author>
<published>2007-10-19T06:39:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4e6045f134784f4b158b3c0f7a282b04bd816887'/>
<id>urn:sha1:4e6045f134784f4b158b3c0f7a282b04bd816887</id>
<content type='text'>
In the following scenario:

code path 1:
  my_function() -&gt; lock(L1); ...; flush_workqueue(); ...

code path 2:
  run_workqueue() -&gt; my_work() -&gt; ...; lock(L1); ...

you can get a deadlock when my_work() is queued or running
but my_function() has acquired L1 already.

This patch adds a pseudo-lock to each workqueue to make lockdep
warn about this scenario.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Acked-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lockdep: syscall exit check</title>
<updated>2007-10-11T20:11:12Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2007-10-11T20:11:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b351d164e860d1ffffdc501c32f55dd1446c385b'/>
<id>urn:sha1:b351d164e860d1ffffdc501c32f55dd1446c385b</id>
<content type='text'>
Provide a check to validate that we do not hold any locks when switching
back to user-space.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>lockdep: fix mismatched lockdep_depth/curr_chain_hash</title>
<updated>2007-10-11T20:11:11Z</updated>
<author>
<name>Gregory Haskins</name>
<email>ghaskins@novell.com</email>
</author>
<published>2007-10-11T20:11:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3aa416b07f0adf01c090baab26fb70c35ec17623'/>
<id>urn:sha1:3aa416b07f0adf01c090baab26fb70c35ec17623</id>
<content type='text'>
It is possible for the current-&gt;curr_chain_key to become inconsistent with the
current index if the chain fails to validate.  The end result is that future
lock_acquire() operations may inadvertently fail to find a hit in the cache
resulting in a new node being added to the graph for every acquire.

Signed-off-by: Gregory Haskins &lt;ghaskins@novell.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
</feed>
