Boqun Feng 9de0c9bbce 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
2020-08-26 12:42:05 +02:00
..
2020-08-03 11:57:03 -07:00
2020-08-20 10:48:17 -07:00
2020-08-11 10:59:19 -07:00
2020-08-04 22:22:25 -07:00
2020-08-14 14:26:08 -07:00
\n
2020-08-06 19:29:51 -07:00
2020-08-04 14:20:26 -07:00
2020-08-04 14:20:26 -07:00
2020-06-03 13:06:42 -07:00
2020-08-12 10:57:59 -07:00
2020-08-10 19:07:44 -07:00
2020-07-28 13:18:01 +02:00
2020-08-12 10:58:02 -07:00
2020-01-08 16:32:55 +00:00
2019-05-24 20:16:01 +02:00
2020-08-07 18:29:15 -07:00
2020-08-14 11:07:02 -07:00
2020-07-23 17:34:18 +10:00
2020-08-04 15:02:07 -07:00
2020-07-01 12:09:13 +03:00
2020-07-27 14:31:12 -04:00
2020-08-04 13:40:35 -07:00
2019-12-04 15:18:39 +01:00
2019-12-18 18:07:31 +01:00
2020-08-12 10:57:59 -07:00
2020-05-09 13:57:12 +02:00
2020-06-04 19:06:24 -07:00
2020-07-07 11:58:59 -05:00
2020-05-09 13:57:12 +02:00