Dennis Li
08ebb485f0
drm/amdgpu: annotate a false positive recursive locking
Re-apply commit 72e14ebf9f
[ 584.110304] ============================================
[ 584.110590] WARNING: possible recursive locking detected
[ 584.110876] 5.6.0-deli-v5.6-2848-g3f3109b0e75f #1 Tainted: G OE
[ 584.111164] --------------------------------------------
[ 584.111456] kworker/38:1/553 is trying to acquire lock:
[ 584.111721] ffff9b15ff0a47a0 (&adev->reset_sem){++++}, at: amdgpu_device_gpu_recover+0x262/0x1030 [amdgpu]
[ 584.112112]
but task is already holding lock:
[ 584.112673] ffff9b1603d247a0 (&adev->reset_sem){++++}, at: amdgpu_device_gpu_recover+0x262/0x1030 [amdgpu]
[ 584.113068]
other info that might help us debug this:
[ 584.113689] Possible unsafe locking scenario:
[ 584.114350] CPU0
[ 584.114685] ----
[ 584.115014] lock(&adev->reset_sem);
[ 584.115349] lock(&adev->reset_sem);
[ 584.115678]
*** DEADLOCK ***
[ 584.116624] May be due to missing lock nesting notation
[ 584.117284] 4 locks held by kworker/38:1/553:
[ 584.117616] #0: ffff9ad635c1d348 ((wq_completion)events){+.+.}, at: process_one_work+0x21f/0x630
[ 584.117967] #1: ffffac708e1c3e58 ((work_completion)(&con->recovery_work)){+.+.}, at: process_one_work+0x21f/0x630
[ 584.118358] #2: ffffffffc1c2a5d0 (&tmp->hive_lock){+.+.}, at: amdgpu_device_gpu_recover+0xae/0x1030 [amdgpu]
[ 584.118786] #3: ffff9b1603d247a0 (&adev->reset_sem){++++}, at: amdgpu_device_gpu_recover+0x262/0x1030 [amdgpu]
[ 584.119222]
stack backtrace:
[ 584.119990] CPU: 38 PID: 553 Comm: kworker/38:1 Kdump: loaded Tainted: G OE 5.6.0-deli-v5.6-2848-g3f3109b0e75f #1
[ 584.120782] Hardware name: Supermicro SYS-7049GP-TRT/X11DPG-QT, BIOS 3.1 05/23/2019
[ 584.121223] Workqueue: events amdgpu_ras_do_recovery [amdgpu]
[ 584.121638] Call Trace:
[ 584.122050] dump_stack+0x98/0xd5
[ 584.122499] __lock_acquire+0x1139/0x16e0
[ 584.122931] ? trace_hardirqs_on+0x3b/0xf0
[ 584.123358] ? cancel_delayed_work+0xa6/0xc0
[ 584.123771] lock_acquire+0xb8/0x1c0
[ 584.124197] ? amdgpu_device_gpu_recover+0x262/0x1030 [amdgpu]
[ 584.124599] down_write+0x49/0x120
[ 584.125032] ? amdgpu_device_gpu_recover+0x262/0x1030 [amdgpu]
[ 584.125472] amdgpu_device_gpu_recover+0x262/0x1030 [amdgpu]
[ 584.125910] ? amdgpu_ras_error_query+0x1b8/0x2a0 [amdgpu]
[ 584.126367] amdgpu_ras_do_recovery+0x159/0x190 [amdgpu]
[ 584.126789] process_one_work+0x29e/0x630
[ 584.127208] worker_thread+0x3c/0x3f0
[ 584.127621] ? __kthread_parkme+0x61/0x90
[ 584.128014] kthread+0x12f/0x150
[ 584.128402] ? process_one_work+0x630/0x630
[ 584.128790] ? kthread_park+0x90/0x90
[ 584.129174] ret_from_fork+0x3a/0x50
Each adev has owned lock_class_key to avoid false positive
recursive locking.
v2:
1. register adev->lock_key into lockdep, otherwise lockdep will
report the below warning
[ 1216.705820] BUG: key ffff890183b647d0 has not been registered!
[ 1216.705924] ------------[ cut here ]------------
[ 1216.705972] DEBUG_LOCKS_WARN_ON(1)
[ 1216.705997] WARNING: CPU: 20 PID: 541 at kernel/locking/lockdep.c:3743 lockdep_init_map+0x150/0x210
v3:
change to use down_write_nest_lock to annotate the false dead-lock
warning.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dennis Li <Dennis.Li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-08-24 13:05:52 -04:00
..
2020-08-14 16:22:41 -04:00
2020-05-28 14:00:49 -04:00
2020-08-14 16:22:40 -04:00
2020-08-24 12:22:56 -04:00
2020-08-24 12:22:56 -04:00
2020-08-24 12:22:56 -04:00
2020-08-14 16:22:40 -04:00
2020-07-01 01:59:11 -04:00
2020-08-24 12:22:56 -04:00
2020-08-14 16:22:40 -04:00
2020-08-14 16:22:40 -04:00
2020-07-27 16:21:50 -04:00
2020-08-04 17:29:29 -04:00
2020-07-21 15:37:37 -04:00
2020-08-04 17:29:29 -04:00
2020-07-01 01:59:14 -04:00
2020-04-28 16:20:29 -04:00
2020-08-14 17:03:20 -04:00
2020-05-19 22:31:31 +01:00
2020-04-09 10:43:18 -04:00
2020-07-01 01:59:22 -04:00
2020-08-18 18:22:10 -04:00
2020-08-18 18:20:26 -04:00
2020-04-09 10:43:14 -04:00
2020-08-24 12:23:48 -04:00
2020-05-18 11:23:37 -04:00
2020-08-24 13:05:52 -04:00
2020-05-08 14:32:10 -04:00
2020-08-04 17:29:29 -04:00
2020-07-02 12:02:51 -04:00
2020-07-02 15:17:31 +10:00
2020-08-11 11:47:35 -04:00
2020-08-11 11:47:35 -04:00
2020-07-01 01:59:07 -04:00
2020-08-06 15:45:52 -04:00
2020-06-24 15:45:51 +10:00
2020-07-14 14:38:41 -04:00
2020-07-01 01:59:23 -04:00
2020-05-29 13:55:08 -04:00
2020-08-14 16:22:40 -04:00
2020-08-24 12:24:06 -04:00
2020-08-14 16:22:29 -04:00
2020-08-04 17:29:29 -04:00
2020-08-04 17:29:29 -04:00
2020-07-01 01:59:19 -04:00
2020-07-14 14:38:41 -04:00
2020-07-02 12:02:50 -04:00
2020-04-13 12:02:40 -04:00
2020-08-18 18:20:17 -04:00
2020-04-28 16:20:29 -04:00
2020-07-01 01:59:19 -04:00
2020-07-01 01:59:19 -04:00
2020-08-14 16:22:40 -04:00
2020-07-01 01:59:11 -04:00
2020-03-10 15:55:11 -04:00
2020-08-14 16:22:40 -04:00
2020-02-13 13:08:13 +01:00
2020-03-10 15:55:11 -04:00
2020-04-01 14:44:42 -04:00
2020-08-17 14:06:28 -04:00
2020-06-30 14:04:00 +10:00
2020-08-24 12:22:56 -04:00
2020-08-14 16:22:39 -04:00
2020-08-14 16:22:40 -04:00
2020-08-14 16:22:40 -04:00
2020-08-04 17:29:18 -04:00
2020-08-04 17:26:54 -04:00
2020-08-24 12:24:14 -04:00
2020-08-14 16:12:22 -04:00
2020-08-18 18:20:17 -04:00
2020-08-18 18:20:17 -04:00
2020-03-16 16:17:55 -04:00
2020-08-18 18:20:26 -04:00
2020-08-18 18:20:26 -04:00
2020-03-10 15:55:11 -04:00
2020-04-28 16:20:29 -04:00
2020-07-01 01:59:22 -04:00
2020-07-01 01:59:22 -04:00
2020-04-28 16:20:30 -04:00
2020-07-02 12:02:56 -04:00
2020-08-24 12:22:56 -04:00
2020-08-04 17:29:29 -04:00
2020-08-24 12:22:56 -04:00
2020-08-14 16:22:39 -04:00
2020-08-04 17:27:20 -04:00
2020-07-23 10:45:00 -04:00
2020-07-01 01:59:24 -04:00
2020-04-28 16:20:30 -04:00
2020-07-21 15:37:40 -04:00
2020-07-21 15:37:40 -04:00
2020-08-24 12:24:06 -04:00
2020-08-24 12:22:56 -04:00
2020-04-28 16:20:30 -04:00
2020-07-02 15:17:31 +10:00
2020-08-11 11:47:35 -04:00
2020-07-02 12:02:50 -04:00
2020-08-10 17:19:12 -04:00
2020-08-24 12:24:14 -04:00
2020-08-24 12:24:14 -04:00
2020-08-24 12:24:14 -04:00
2020-07-15 12:47:25 -04:00
2020-07-01 01:59:07 -04:00
2020-08-14 16:22:40 -04:00
2020-02-26 14:21:13 -05:00
2020-04-28 16:20:29 -04:00
2020-08-14 17:03:20 -04:00
2020-07-02 12:02:50 -04:00
2020-06-24 15:45:51 +10:00
2020-06-24 15:45:51 +10:00
2020-06-24 15:45:51 +10:00
2020-07-02 15:17:31 +10:00
2020-04-22 18:11:49 -04:00
2020-07-22 18:43:16 -04:00
2020-05-18 11:24:21 -04:00
2020-07-02 12:02:50 -04:00
2020-08-24 12:22:56 -04:00
2020-08-24 12:22:56 -04:00
2020-08-24 12:23:02 -04:00
2020-03-05 00:32:47 -05:00
2020-08-24 12:22:56 -04:00
2020-07-08 09:03:38 -04:00
2020-07-22 18:43:04 -04:00
2020-08-10 17:26:52 -04:00
2020-07-01 01:59:24 -04:00
2020-08-04 17:29:28 -04:00
2020-08-24 12:22:56 -04:00
2020-08-24 12:22:56 -04:00
2020-08-24 12:24:06 -04:00
2020-08-24 12:24:06 -04:00
2020-07-08 09:03:19 -04:00
2020-07-08 09:03:32 -04:00
2020-07-27 16:20:22 -04:00
2020-08-18 18:22:16 -04:00
2020-07-01 01:59:09 -04:00
2020-08-14 16:22:41 -04:00
2020-07-01 01:59:11 -04:00
2020-07-01 01:59:12 -04:00
2020-08-24 12:23:02 -04:00
2020-08-14 16:22:40 -04:00
2020-08-14 16:22:40 -04:00
2020-08-14 16:22:40 -04:00
2020-08-14 16:22:40 -04:00
2020-08-14 16:22:40 -04:00
2020-03-06 14:34:42 -05:00
2020-07-15 12:45:05 -04:00
2020-08-24 12:23:48 -04:00
2020-04-24 11:42:11 -04:00
2020-08-24 12:23:48 -04:00
2020-04-24 11:42:11 -04:00
2020-04-01 14:44:43 -04:00
2020-07-21 15:37:39 -04:00
2020-04-28 15:58:12 -04:00
2020-07-01 01:59:07 -04:00
2020-04-01 14:44:42 -04:00
2020-04-01 14:44:42 -04:00
2020-08-14 16:12:22 -04:00
2020-08-14 17:03:20 -04:00
2020-07-02 12:02:50 -04:00
2020-05-14 16:42:43 -04:00
2020-07-01 01:59:19 -04:00
2020-04-23 15:41:06 -04:00
2020-05-22 13:41:53 -04:00
2020-08-14 16:22:41 -04:00
2020-04-23 15:40:46 -04:00
2020-06-03 13:52:04 -04:00
2020-04-28 16:20:29 -04:00
2020-04-28 16:20:29 -04:00
2020-07-01 01:59:27 -04:00
2020-07-14 14:38:48 -04:00
2020-06-03 13:52:04 -04:00
2020-07-15 12:46:26 -04:00
2020-06-03 13:52:04 -04:00
2020-04-28 16:20:29 -04:00
2020-07-02 12:02:50 -04:00
2020-07-01 01:59:24 -04:00
2020-08-14 17:03:20 -04:00
2020-07-02 12:02:50 -04:00
2020-06-03 13:52:00 -04:00
2020-08-14 16:22:41 -04:00
2020-07-21 15:37:49 -04:00
2020-07-01 01:59:24 -04:00
2020-08-14 17:03:20 -04:00
2020-07-02 12:02:50 -04:00
2020-05-14 16:42:43 -04:00
2020-08-14 16:22:39 -04:00
2020-04-30 16:48:27 -04:00
2020-07-23 10:45:00 -04:00
2020-07-27 16:23:00 -04:00
2020-07-27 16:23:00 -04:00
2020-07-01 01:59:24 -04:00
2020-07-01 01:59:24 -04:00
2020-04-09 10:43:14 -04:00
2020-04-09 10:43:14 -04:00
2020-04-09 10:43:14 -04:00
2020-07-08 09:03:25 -04:00
2020-04-09 10:43:14 -04:00
2020-04-09 10:43:14 -04:00
2020-07-08 09:03:25 -04:00
2020-07-08 09:03:19 -04:00
2020-07-08 09:03:32 -04:00
2020-07-27 16:20:35 -04:00
2020-08-14 16:22:41 -04:00
2020-07-01 01:59:09 -04:00
2020-08-14 17:03:20 -04:00
2020-07-02 12:02:50 -04:00
2020-07-02 12:02:50 -04:00