[tip:WIP.core/stacktrace 37/47] kernel/locking/lockdep.c:2806:2: error: implicit declaration of function 'print_lock_trace'

From: kbuild test robot
Date: Sun Apr 14 2019 - 18:26:53 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.core/stacktrace
head: 63c35ea6b829a0f98d307a8dec038095681ecd13
commit: 88e5708cae1e9cb0cca97bb0af5866ac54532ceb [37/47] lockdep: Simplify stack trace handling
config: x86_64-randconfig-l2-201915 (attached as .config)
compiler: gcc-5 (Debian 5.5.0-3) 5.4.1 20171010
reproduce:
git checkout 88e5708cae1e9cb0cca97bb0af5866ac54532ceb
# save the attached .config to linux build tree
make ARCH=x86_64

All errors (new ones prefixed by >>):

kernel/locking/lockdep.c: In function 'print_usage_bug':
>> kernel/locking/lockdep.c:2806:2: error: implicit declaration of function 'print_lock_trace' [-Werror=implicit-function-declaration]
print_lock_trace(hlock_class(this)->usage_traces + prev_bit, 1);
^
cc1: some warnings being treated as errors

vim +/print_lock_trace +2806 kernel/locking/lockdep.c

2780
2781 static int
2782 print_usage_bug(struct task_struct *curr, struct held_lock *this,
2783 enum lock_usage_bit prev_bit, enum lock_usage_bit new_bit)
2784 {
2785 if (!debug_locks_off_graph_unlock() || debug_locks_silent)
2786 return 0;
2787
2788 pr_warn("\n");
2789 pr_warn("================================\n");
2790 pr_warn("WARNING: inconsistent lock state\n");
2791 print_kernel_ident();
2792 pr_warn("--------------------------------\n");
2793
2794 pr_warn("inconsistent {%s} -> {%s} usage.\n",
2795 usage_str[prev_bit], usage_str[new_bit]);
2796
2797 pr_warn("%s/%d [HC%u[%lu]:SC%u[%lu]:HE%u:SE%u] takes:\n",
2798 curr->comm, task_pid_nr(curr),
2799 trace_hardirq_context(curr), hardirq_count() >> HARDIRQ_SHIFT,
2800 trace_softirq_context(curr), softirq_count() >> SOFTIRQ_SHIFT,
2801 trace_hardirqs_enabled(curr),
2802 trace_softirqs_enabled(curr));
2803 print_lock(this);
2804
2805 pr_warn("{%s} state was registered at:\n", usage_str[prev_bit]);
> 2806 print_lock_trace(hlock_class(this)->usage_traces + prev_bit, 1);
2807
2808 print_irqtrace_events(curr);
2809 pr_warn("\nother info that might help us debug this:\n");
2810 print_usage_bug_scenario(this);
2811
2812 lockdep_print_held_locks(curr);
2813
2814 pr_warn("\nstack backtrace:\n");
2815 dump_stack();
2816
2817 return 0;
2818 }
2819

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip