forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork0
Commitd61fc96
lockdep: Avoid to modify chain keys in validate_chain()
Chris Wilson reported a problem spotted by check_chain_key(): a chainkey got changed in validate_chain() because we modify the ->read invalidate_chain() to skip checks for dependency adding, and ->read istaken into calculation for chain key since commitf611e8c("lockdep: Take read/write status in consideration when generatechainkey").Fix this by avoiding to modify ->read in validate_chain() based on twofacts: a) since we now support recursive read lock detection, there isno need to skip checks for dependency adding for recursive readers, b)since we have a), there is only one case left (nest_lock) where we wantto skip checks in validate_chain(), we simply remove the modificationfor ->read and rely on the return value of check_deadlock() to skip thedependency adding.Reported-by: Chris Wilson <chris@chris-wilson.co.uk>Signed-off-by: Boqun Feng <boqun.feng@gmail.com>Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>Link:https://lkml.kernel.org/r/20201102053743.450459-1-boqun.feng@gmail.com1 parent1e106aa commitd61fc96
1 file changed
+9
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2765 | 2765 | | |
2766 | 2766 | | |
2767 | 2767 | | |
2768 | | - | |
| 2768 | + | |
| 2769 | + | |
| 2770 | + | |
2769 | 2771 | | |
2770 | 2772 | | |
2771 | 2773 | | |
| |||
2788 | 2790 | | |
2789 | 2791 | | |
2790 | 2792 | | |
2791 | | - | |
| 2793 | + | |
2792 | 2794 | | |
2793 | 2795 | | |
2794 | 2796 | | |
| |||
3592 | 3594 | | |
3593 | 3595 | | |
3594 | 3596 | | |
3595 | | - | |
3596 | | - | |
3597 | | - | |
3598 | | - | |
3599 | | - | |
3600 | | - | |
3601 | | - | |
3602 | 3597 | | |
3603 | 3598 | | |
3604 | | - | |
| 3599 | + | |
| 3600 | + | |
| 3601 | + | |
| 3602 | + | |
| 3603 | + | |
3605 | 3604 | | |
3606 | 3605 | | |
3607 | 3606 | | |
| |||
0 commit comments
Comments
(0)