From: Ingo Molnar It's not safe to dump another task's held-locks array - restrict this to the current task only. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton --- kernel/lockdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN kernel/lockdep.c~lockdep-show-held-locks-when-showing-a-stackdump-fix-2 kernel/lockdep.c --- a/kernel/lockdep.c~lockdep-show-held-locks-when-showing-a-stackdump-fix-2 +++ a/kernel/lockdep.c @@ -2758,7 +2758,8 @@ EXPORT_SYMBOL_GPL(debug_show_all_locks); void debug_show_held_locks(struct task_struct *task) { - lockdep_print_held_locks(task); + if (task == current) + lockdep_print_held_locks(task); } EXPORT_SYMBOL_GPL(debug_show_held_locks); _