Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

locking/lockdep: Remove the unnecessary trace saving

In print_bad_irq_dependency(), save_trace() is called to set the ->trace
for @prev_root as the current call trace, however @prev_root corresponds
to the the held lock, which may not be acquired in current call trace,
therefore it's wrong to use save_trace() to set ->trace of @prev_root.
Moreover, with our adjustment of printing backwards dependency path, the
->trace of @prev_root is unncessary, so remove it.

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-3-boqun.feng@gmail.com

authored by

Boqun Feng and committed by
Peter Zijlstra
d4c157c7 69c7a5fb

-3
-3
kernel/locking/lockdep.c
··· 2550 2550 lockdep_print_held_locks(curr); 2551 2551 2552 2552 pr_warn("\nthe dependencies between %s-irq-safe lock and the holding lock:\n", irqclass); 2553 - prev_root->trace = save_trace(); 2554 - if (!prev_root->trace) 2555 - return; 2556 2553 print_shortest_lock_dependencies_backwards(backwards_entry, prev_root); 2557 2554 2558 2555 pr_warn("\nthe dependencies between the lock to be acquired");