Commit-ID:  31a490e5c54f5499aa744f8524611e2a4b19f8ba
Gitweb:     https://git.kernel.org/tip/31a490e5c54f5499aa744f8524611e2a4b19f8ba
Author:     Yuyang Du <[email protected]>
AuthorDate: Mon, 6 May 2019 16:19:27 +0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 3 Jun 2019 11:55:44 +0200

locking/lockdep: Update comment

A leftover comment is removed. While at it, add more explanatory
comments. Such a trivial patch!

Signed-off-by: Yuyang Du <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
 kernel/locking/lockdep.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 6cf14c84eb6d..a9799f9ed093 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -2811,10 +2811,16 @@ static int validate_chain(struct task_struct *curr,
                 * - is softirq-safe, if this lock is hardirq-unsafe
                 *
                 * And check whether the new lock's dependency graph
-                * could lead back to the previous lock.
+                * could lead back to the previous lock:
                 *
-                * any of these scenarios could lead to a deadlock. If
-                * All validations
+                * - within the current held-lock stack
+                * - across our accumulated lock dependency records
+                *
+                * any of these scenarios could lead to a deadlock.
+                */
+               /*
+                * The simple case: does the current hold the same lock
+                * already?
                 */
                int ret = check_deadlock(curr, hlock, hlock->read);
 

Reply via email to