summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBoqun Feng <boqun.feng@gmail.com>2021-06-19 01:01:09 +0800
committerPeter Zijlstra <peterz@infradead.org>2021-06-22 16:42:07 +0200
commit7b1f8c6179769af6ffa055e1169610b51d71edd5 (patch)
tree71670a7b14063f6554b8197c688994cefd817fcf /lib
parentd4c157c7b1a67a0844a904baaca9a840c196c103 (diff)
downloadlinux-7b1f8c6179769af6ffa055e1169610b51d71edd5.tar.gz
lockding/lockdep: Avoid to find wrong lock dep path in check_irq_usage()
In the step #3 of check_irq_usage(), we seach backwards to find a lock whose usage conflicts the usage of @target_entry1 on safe/unsafe. However, we should only keep the irq-unsafe usage of @target_entry1 into consideration, because it could be a case where a lock is hardirq-unsafe but soft-safe, and in check_irq_usage() we find it because its hardirq-unsafe could result into a hardirq-safe-unsafe deadlock, but currently since we don't filter out the other usage bits, so we may find a lock dependency path softirq-unsafe -> softirq-safe, which in fact doesn't cause a deadlock. And this may cause misleading lockdep splats. Fix this by only keeping LOCKF_ENABLED_IRQ_ALL bits when we try the backwards search. Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20210618170110.3699115-4-boqun.feng@gmail.com
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions