[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160913021714.GG13049@yexl-desktop>
Date: Tue, 13 Sep 2016 10:17:14 +0800
From: kernel test robot <xiaolong.ye@...el.com>
To: Rui Xiang <rui.xiang@...wei.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
linux-kernel@...r.kernel.org, lkp@...org
Subject: [lkp] [x86/alternatives] 7c14957c0c: INFO: possible circular
locking dependency detected ]
FYI, we noticed the following commit:
https://github.com/0day-ci/linux Rui-Xiang/x86-alternatives-add-missing-mutex-lock-in-alternatives_text_reserved/20160912-152147
commit 7c14957c0c077a9267149a4a0aefebe89f560e12 ("x86/alternatives: add missing mutex lock in,alternatives_text_reserved")
in testcase: boot
on test machine: qemu-system-x86_64 -enable-kvm -m 320M
caused below changes:
+--------------------------------------------------------------------------------------+------------+------------+
| | 3c84aabde9 | 7c14957c0c |
+--------------------------------------------------------------------------------------+------------+------------+
| boot_successes | 5 | 0 |
| boot_failures | 1 | 8 |
| BUG:kernel_hang_in_early-boot_stage,last_printk:Probing_EDD(edd=off_to_disable)...ok | 1 | |
| INFO:possible_circular_locking_dependency_detected | 0 | 8 |
| calltrace:init_kprobes | 0 | 8 |
+--------------------------------------------------------------------------------------+------------+------------+
[ 18.166305] Kprobe smoke test: started
[ 18.172662]
[ 18.173782] ======================================================
[ 18.177716] [ INFO: possible circular locking dependency detected ]
[ 18.181715] 4.8.0-rc5-00438-g7c14957 #1 Not tainted
[ 18.184921] -------------------------------------------------------
[ 18.188716] swapper/0/1 is trying to acquire lock:
[ 18.191783] (smp_alt){+.+...}, at: [<ffffffffa9026e7b>] alternatives_text_reserved+0x1b/0x90
[ 18.197820]
[ 18.197820] but task is already holding lock:
[ 18.201537] (text_mutex){+.+...}, at: [<ffffffffa914f803>] register_kprobe+0x643/0x720
[ 18.207035]
[ 18.207035] which lock already depends on the new lock.
[ 18.207035]
[ 18.212068]
[ 18.212068] the existing dependency chain (in reverse order) is:
[ 18.216850]
-> #1 (text_mutex){+.+...}:
[ 18.219802] [<ffffffffa90e6891>] lock_acquire+0x71/0x90
[ 18.223633] [<ffffffffa98dcbb1>] mutex_lock_nested+0x71/0x370
[ 18.227711] [<ffffffffa90279de>] alternatives_smp_module_add+0xee/0x160
[ 18.232118] [<ffffffffaa09a136>] alternative_instructions+0x6f/0xc6
[ 18.236675] [<ffffffffaa09bdc2>] check_bugs+0x13/0x39
[ 18.240424] [<ffffffffaa0910d6>] start_kernel+0x464/0x480
[ 18.244492] [<ffffffffaa09028d>] x86_64_start_reservations+0x24/0x26
[ 18.249126] [<ffffffffaa090372>] x86_64_start_kernel+0xe3/0xf0
[ 18.253397]
-> #0 (smp_alt){+.+...}:
[ 18.256056] [<ffffffffa90e5fc9>] __lock_acquire+0xcd9/0x11c0
[ 18.260064] [<ffffffffa90e6891>] lock_acquire+0x71/0x90
[ 18.263879] [<ffffffffa98dcbb1>] mutex_lock_nested+0x71/0x370
[ 18.268131] [<ffffffffa9026e7b>] alternatives_text_reserved+0x1b/0x90
[ 18.276715] [<ffffffffa90439fd>] arch_prepare_kprobe+0x1d/0x110
[ 18.284026] [<ffffffffa914f80b>] register_kprobe+0x64b/0x720
[ 18.289064] [<ffffffffa914a07d>] init_test_probes+0x5d/0x5b0
[ 18.300388] [<ffffffffaa0afb01>] init_kprobes+0x21c/0x261
[ 18.304374] [<ffffffffa90004ae>] do_one_initcall+0x9e/0x180
[ 18.308501] [<ffffffffaa091309>] kernel_init_freeable+0x217/0x2d8
[ 18.313007] [<ffffffffa98d1e53>] kernel_init+0x13/0x160
[ 18.316859] [<ffffffffa98e1baa>] ret_from_fork+0x2a/0x40
[ 18.320449]
[ 18.320449] other info that might help us debug this:
[ 18.320449]
[ 18.325461] Possible unsafe locking scenario:
[ 18.325461]
[ 18.329341] CPU0 CPU1
[ 18.332070] ---- ----
[ 18.335136] lock(text_mutex);
[ 18.337314] lock(smp_alt);
[ 18.340894] lock(text_mutex);
[ 18.344641] lock(smp_alt);
[ 18.346744]
[ 18.346744] *** DEADLOCK ***
[ 18.346744]
[ 18.350563] 2 locks held by swapper/0/1:
[ 18.353217] #0: (kprobe_mutex){+.+...}, at: [<ffffffffa914f331>] register_kprobe+0x171/0x720
[ 18.358937] #1: (text_mutex){+.+...}, at: [<ffffffffa914f803>] register_kprobe+0x643/0x720
[ 18.364580]
[ 18.364580] stack backtrace:
[ 18.367479] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.0-rc5-00438-g7c14957 #1
[ 18.380205] ffffab5f80073bd0 ffffffffa953120a ffffffffaa8a1c40 ffffffffaa8a1c40
[ 18.397397] ffffffffaa89d490 ffff99f10e8be820 ffffab5f80073c10 ffffffffa90e26d1
[ 18.409510] 000000000e8be820 ffff99f10e8be858 ffff99f10e8be820 9b6c97af48d594d9
[ 18.423190] Call Trace:
[ 18.424696] [<ffffffffa953120a>] dump_stack+0xb3/0x119
[ 18.432176] [<ffffffffa90e26d1>] print_circular_bug+0x201/0x220
[ 18.440272] [<ffffffffa90e5fc9>] __lock_acquire+0xcd9/0x11c0
[ 18.445740] [<ffffffffa9149d40>] ? stop_machine_from_inactive_cpu+0x160/0x160
[ 18.450226] [<ffffffffa90e6891>] lock_acquire+0x71/0x90
[ 18.453574] [<ffffffffa9026e7b>] ? alternatives_text_reserved+0x1b/0x90
[ 18.470881] [<ffffffffa98dcbb1>] mutex_lock_nested+0x71/0x370
[ 18.474546] [<ffffffffa9026e7b>] ? alternatives_text_reserved+0x1b/0x90
[ 18.478720] [<ffffffffa90e3be2>] ? trace_hardirqs_on_caller+0x192/0x1d0
[ 18.496043] [<ffffffffa9026e7b>] ? alternatives_text_reserved+0x1b/0x90
Thanks,
Xiaolong
View attachment "config-4.8.0-rc5-00438-g7c14957" of type "text/plain" (102772 bytes)
Download attachment "dmesg.xz" of type "application/octet-stream" (12672 bytes)
Powered by blists - more mailing lists