Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1335626

Re: [PATCH 0/3] lockdep: liblockdep: Prevent chain_key collisions

From Sasha Levin <sasha.levin@oracle.com>
Newsgroups linux.kernel
Subject Re: [PATCH 0/3] lockdep: liblockdep: Prevent chain_key collisions
Date 2016-02-16 17:40 +0100
Message-ID <r2QPq-1Uv-47@gated-at.bofh.it> (permalink)
References <r0Mwx-Bp-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 02/10/2016 06:33 PM, Alfredo Alvarez Fernandez wrote:
> This patch series prevents possible collisions in the chain_key
> hashing macro iterate_chain_key(key1, key2) that can lead to lockdep 
> not detecting very simple deadlocks such as AA or ABBA.
> 
> The problem only affects the first allocated lock classes. That could 
> explain why it was not seen while running lockdep's test suite, since
> by the time the test suite runs there are already registered lock 
> classes and the indexes allocated for the lock classes under test are
> high enough to avoid collisions.
> 
> The patch series also extends the tools/liblockdep test suite with 
> tests covering the offending cases.
> 
> I came across the problem while testing a simple AA deadlock scenario
> in userspace using a pthread_mutex and tools/liblockdep. In that 
> context it is fairly easy to have a clean and deterministic initial 
> state where the problem can be reproduced.
> 
> The proposed solution was tested with the newly introduced tests and
> also with lockdep's test suite:
>  [    0.000000] Good, all 253 testcases passed! |

Thanks Alfredo, I'll grab the first two.

Peter/Ingo, will you take the lockdep one or do you want it to go through
my tree?


Thanks,
Sasha

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] lockdep: liblockdep: Prevent chain_key collisions Alfredo Alvarez Fernandez <alfredoalvarezfernandez@gmail.com> - 2016-02-11 00:40 +0100
  [PATCH 3/3] lockdep: prevent chain_key collisions Alfredo Alvarez Fernandez <alfredoalvarezfernandez@gmail.com> - 2016-02-11 00:40 +0100
    Re: [PATCH 3/3] lockdep: prevent chain_key collisions Ingo Molnar <mingo@kernel.org> - 2016-02-17 09:40 +0100
      [PATCH v2 2/3] tools/liblockdep: add tests Alfredo Alvarez Fernandez <alfredoalvarezfernandez@gmail.com> - 2016-02-19 07:50 +0100
      [PATCH v2 0/3] lockdep: liblockdep: Prevent chain_key collisions Alfredo Alvarez Fernandez <alfredoalvarezfernandez@gmail.com> - 2016-02-19 07:50 +0100
        [PATCH v2 3/3] lockdep: prevent and detect chain_key collisions Alfredo Alvarez Fernandez <alfredoalvarezfernandez@gmail.com> - 2016-02-19 08:00 +0100
        [PATCH v2 1/3] tools/liblockdep: add userspace version of READ_ONCE Alfredo Alvarez Fernandez <alfredoalvarezfernandez@gmail.com> - 2016-02-19 08:00 +0100
  Re: [PATCH 0/3] lockdep: liblockdep: Prevent chain_key collisions Sasha Levin <sasha.levin@oracle.com> - 2016-02-16 17:40 +0100
    Re: [PATCH 0/3] lockdep: liblockdep: Prevent chain_key collisions Peter Zijlstra <peterz@infradead.org> - 2016-02-16 18:30 +0100

csiph-web