diff options
author | Boqun Feng <boqun.feng@gmail.com> | 2020-08-07 10:42:28 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-08-26 13:42:05 +0300 |
commit | 9de0c9bbcedf752e762c67f105bff342e30f9105 (patch) | |
tree | b4995c5540c2740a11ba40dec3f1f841a0241cf1 /sound/synth | |
parent | 61775ed243433ff0556c4f76905929fe01e92922 (diff) | |
download | linux-9de0c9bbcedf752e762c67f105bff342e30f9105.tar.xz |
lockdep: Support deadlock detection for recursive read locks in check_noncircular()
Currently, lockdep only has limit support for deadlock detection for
recursive read locks.
This patch support deadlock detection for recursive read locks. The
basic idea is:
We are about to add dependency B -> A in to the dependency graph, we use
check_noncircular() to find whether we have a strong dependency path
A -> .. -> B so that we have a strong dependency circle (a closed strong
dependency path):
A -> .. -> B -> A
, which doesn't have two adjacent dependencies as -(*R)-> L -(S*)->.
Since A -> .. -> B is already a strong dependency path, so if either
B -> A is -(E*)-> or A -> .. -> B is -(*N)->, the circle A -> .. -> B ->
A is strong, otherwise not. So we introduce a new match function
hlock_conflict() to replace the class_equal() for the deadlock check in
check_noncircular().
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200807074238.1632519-10-boqun.feng@gmail.com
Diffstat (limited to 'sound/synth')
0 files changed, 0 insertions, 0 deletions