Alex Xie
b7ae412c6f
drm/amdgpu: Fix blocking in RCU critical section(v2)
In RCU read-side critical sections, blocking or sleeping is prohibited.
v2: Unlock RCU for the code path where result==NULL. (David Zhou)
Update subject
Tested-by and reported by: Dave Airlie <airlied@redhat.com>
[ 141.965723] =============================
[ 141.965724] WARNING: suspicious RCU usage
[ 141.965726] 4.12.0-rc7 #221 Not tainted
[ 141.965727] -----------------------------
[ 141.965728] /home/airlied/devel/kernel/linux-2.6/include/linux/rcupdate.h:531
Illegal context switch in RCU read-side critical section!
[ 141.965730]
other info that might help us debug this:
[ 141.965731]
rcu_scheduler_active = 2, debug_locks = 0
[ 141.965732] 1 lock held by amdgpu_cs:0/1332:
[ 141.965733] #0: (rcu_read_lock){......}, at: [<ffffffffa01a0d07>]
amdgpu_bo_list_get+0x0/0x109 [amdgpu]
[ 141.965774]
stack backtrace:
[ 141.965776] CPU: 6 PID: 1332 Comm: amdgpu_cs:0 Not tainted 4.12.0-rc7 #221
[ 141.965777] Hardware name: To be filled by O.E.M. To be filled by
O.E.M./M5A97 R2.0, BIOS 2603 06/26/2015
[ 141.965778] Call Trace:
[ 141.965782] dump_stack+0x68/0x92
[ 141.965785] lockdep_rcu_suspicious+0xf7/0x100
[ 141.965788] ___might_sleep+0x56/0x1fc
[ 141.965790] __might_sleep+0x68/0x6f
[ 141.965793] __mutex_lock+0x4e/0x7b5
[ 141.965817] ? amdgpu_bo_list_get+0xa4/0x109 [amdgpu]
[ 141.965820] ? lock_acquire+0x125/0x1b9
[ 141.965844] ? amdgpu_bo_list_set+0x464/0x464 [amdgpu]
[ 141.965846] mutex_lock_nested+0x16/0x18
[ 141.965848] ? mutex_lock_nested+0x16/0x18
[ 141.965872] amdgpu_bo_list_get+0xa4/0x109 [amdgpu]
[ 141.965895] amdgpu_cs_ioctl+0x4a0/0x17dd [amdgpu]
[ 141.965898] ? radix_tree_node_alloc.constprop.11+0x77/0xab
[ 141.965916] drm_ioctl+0x264/0x393 [drm]
[ 141.965939] ? amdgpu_cs_find_mapping+0x83/0x83 [amdgpu]
[ 141.965942] ? trace_hardirqs_on_caller+0x16a/0x186
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-07-25 16:15:46 -04:00
..
2017-07-25 16:15:46 -04:00
2017-05-31 10:57:08 +02:00
2017-06-21 10:51:26 +01:00
2017-07-09 18:48:37 -07:00
2017-05-16 17:17:51 +02:00
2017-06-16 09:33:43 +10:00
2017-05-16 17:18:23 +02:00
2017-07-13 11:26:18 -07:00
2017-05-16 17:18:56 +02:00
2017-07-09 18:48:37 -07:00
2017-07-09 18:48:37 -07:00
2017-06-08 14:59:14 -07:00
2017-05-30 15:54:15 +10:00
2017-06-16 13:58:27 +10:00
2017-05-18 07:13:04 +02:00
2017-05-18 07:12:57 +02:00
2017-07-13 12:38:49 -07:00
2017-07-21 14:04:44 +10:00
2017-06-27 17:34:53 +08:00
2017-06-16 13:58:27 +10:00
2017-07-09 18:48:37 -07:00
2017-06-27 08:28:30 +10:00
2017-06-19 19:58:57 -04:00
2017-06-15 14:26:24 -04:00
2017-07-25 15:30:27 +10:00
2017-06-02 11:09:34 +03:00
2017-06-14 20:18:22 +02:00
2017-06-07 11:50:00 -07:00
2017-05-30 15:54:15 +10:00
2017-05-18 07:13:23 +02:00
2017-07-13 20:21:55 -05:00
2017-06-09 12:25:38 +01:00
2017-07-10 14:13:00 -04:00
2017-05-18 07:13:34 +02:00
2017-05-04 08:11:46 +02:00
2017-03-29 09:50:38 +02:00
2017-05-18 07:13:40 +02:00
2017-05-18 09:24:30 -04:00
2017-05-31 10:48:58 +02:00
2017-06-16 10:02:35 +10:00
2017-05-18 07:13:47 +02:00
2017-06-27 08:28:30 +10:00
2017-05-17 14:36:49 +02:00
2017-05-31 10:30:38 +02:00
2017-07-03 16:25:43 -04:00
2017-05-18 17:22:39 +02:00
2017-07-14 13:19:48 -07:00
2017-05-22 09:47:34 +02:00
2017-05-18 07:14:05 +02:00
2017-05-29 20:57:25 +02:00
2017-07-24 15:57:28 +10:00
2017-06-05 09:57:14 +08:00
2017-01-26 10:44:43 +01:00
2017-06-16 13:58:27 +10:00
2017-06-15 14:26:02 -04:00
2017-01-25 16:22:42 +01:00
2017-05-22 09:49:48 +02:00
2017-05-30 08:37:50 +02:00
2017-07-04 13:16:26 -04:00
2017-02-28 14:32:19 +01:00
2017-04-18 08:56:29 +02:00
2017-06-27 08:28:30 +10:00
2017-05-30 08:37:24 +02:00
2017-03-29 09:56:25 +02:00
2017-04-06 10:22:43 +02:00
2017-04-06 22:49:50 +02:00
2017-04-07 16:18:28 -04:00
2017-03-24 09:36:06 +01:00
2017-07-08 20:51:46 -04:00
2017-02-23 11:06:12 -05:00
2017-05-29 13:43:26 +03:00
2017-07-20 10:20:31 +02:00
2017-06-02 11:09:35 -04:00
2017-01-25 16:30:34 +01:00
2017-02-21 15:41:24 +02:00
2017-05-02 10:37:45 +02:00
2017-01-25 16:30:34 +01:00
2017-02-28 16:16:48 +01:00
2017-04-18 17:57:37 +02:00
2017-05-22 09:49:48 +02:00
2017-06-14 12:10:22 +10:00
2017-03-23 08:15:55 +01:00
2017-07-03 10:31:37 +02:00
2017-03-14 15:07:33 +01:00
2017-05-18 17:22:39 +02:00
2017-01-14 11:37:18 +01:00
2017-07-09 18:48:37 -07:00
2017-07-13 11:25:04 -07:00
2017-07-09 18:48:37 -07:00
2017-06-01 08:02:14 +02:00
2017-03-09 16:18:02 +01:00
2017-07-04 13:16:26 -04:00
2017-03-02 08:42:29 +01:00
2017-02-06 16:57:37 +01:00
2017-02-28 16:16:48 +01:00
2017-03-14 15:07:33 +01:00
2017-02-28 16:14:53 +01:00
2017-03-22 19:45:00 +02:00
2017-04-05 09:26:45 +02:00
2017-04-06 17:00:27 -04:00
2017-03-09 16:18:02 +01:00
2017-05-22 09:49:48 +02:00
2017-05-23 09:39:14 +02:00
2017-05-08 09:39:13 +02:00
2017-02-26 21:43:08 +01:00
2017-05-30 08:37:50 +02:00
2017-04-12 18:11:32 +02:00
2017-05-22 09:49:48 +02:00
2017-03-21 10:15:56 +02:00
2017-03-30 12:02:00 -07:00
2017-07-06 15:53:00 +10:00
2017-04-04 20:47:54 +02:00
2017-03-14 14:38:33 +01:00
2017-06-29 14:40:47 +02:00
2017-02-24 17:46:55 -08:00
2017-02-03 11:10:32 +01:00
2017-05-08 12:24:06 -07:00
2017-06-16 09:33:43 +10:00