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
..
2016-11-30 14:18:51 +10:00
2016-10-25 14:38:45 -04:00
2017-01-27 11:12:39 -05:00
2017-03-29 23:53:24 -04:00
2017-05-31 16:48:55 -04:00
2017-05-31 16:48:55 -04:00
2017-07-13 20:21:56 -05:00
2017-05-31 16:48:50 -04:00
2017-06-20 12:06:50 -04:00
2017-04-04 14:42:40 -04:00
2017-05-10 11:23:17 -04:00
2017-05-10 11:23:17 -04:00
2017-03-29 23:53:24 -04:00
2017-04-28 17:33:07 -04:00
2017-03-29 23:54:16 -04:00
2017-07-25 16:15:46 -04:00
2017-06-30 11:28:35 -04:00
2016-11-30 14:18:51 +10:00
2017-07-06 15:53:00 +10:00
2017-05-31 16:49:01 -04:00
2017-07-09 18:48:37 -07:00
2017-05-01 11:21:42 -04:00
2017-05-16 17:17:41 +02:00
2017-03-29 23:53:03 -04:00
2017-07-04 12:07:53 -04:00
2017-05-25 16:13:12 -04:00
2017-05-24 17:40:40 -04:00
2017-05-24 17:40:31 -04:00
2016-08-19 12:30:58 -04:00
2017-05-24 18:17:58 -04:00
2017-06-15 11:50:27 -04:00
2017-06-07 18:20:59 -04:00
2017-04-28 17:32:53 -04:00
2017-01-27 11:12:39 -05:00
2016-09-27 13:00:52 -04:00
2017-05-24 17:41:31 -04:00
2016-09-14 15:10:27 -04:00
2017-05-24 17:41:23 -04:00
2017-05-24 17:40:37 -04:00
2017-03-29 23:53:37 -04:00
2017-05-24 18:14:49 -04:00
2017-06-29 12:43:49 -04:00
2017-04-04 13:40:32 -04:00
2017-05-18 12:57:06 +10:00
2017-05-24 18:24:38 -04:00
2017-04-28 17:33:08 -04:00
2016-09-14 15:10:37 -04:00
2017-05-10 13:36:21 -04:00
2017-01-27 11:13:07 -05:00
2017-07-05 13:18:50 -04:00
2016-10-25 14:38:45 -04:00
2017-04-28 17:33:16 -04:00
2017-06-29 12:43:48 -04:00
2017-05-24 17:41:19 -04:00
2017-05-31 16:49:04 -04:00
2017-06-01 16:00:20 -04:00
2017-06-01 16:00:20 -04:00
2017-04-28 17:33:16 -04:00
2017-06-09 11:29:46 -04:00
2017-06-09 11:29:46 -04:00
2017-03-29 23:53:29 -04:00
2017-04-28 17:32:21 -04:00
2017-06-16 09:56:53 +10:00
2017-01-27 12:20:33 -05:00
2017-06-15 11:50:26 -04:00
2017-06-15 11:50:22 -04:00
2017-04-04 13:40:32 -04:00
2017-03-29 23:53:46 -04:00
2017-06-01 16:00:21 -04:00
2017-06-01 16:00:22 -04:00
2017-05-24 17:41:47 -04:00
2017-05-24 17:41:41 -04:00
2017-05-24 17:40:17 -04:00
2017-05-24 17:40:38 -04:00
2017-06-16 09:56:53 +10:00
2017-06-09 11:29:38 -04:00
2017-05-28 10:23:00 -07:00
2017-06-29 12:43:51 -04:00
2017-03-29 23:54:17 -04:00
2017-03-29 23:54:17 -04:00
2017-06-20 12:06:49 -04:00
2016-05-04 20:23:53 -04:00
2016-08-08 13:28:39 -04:00
2017-01-27 11:12:39 -05:00
2016-09-14 15:10:37 -04:00
2016-07-14 16:39:35 -04:00
2017-05-30 15:54:15 +10:00
2017-03-29 23:52:52 -04:00
2017-05-16 17:17:41 +02:00
2017-05-16 17:17:41 +02:00
2016-10-25 14:38:45 -04:00
2017-03-29 23:55:50 -04:00
2016-10-25 14:38:45 -04:00
2017-06-16 09:56:53 +10:00
2016-10-25 14:38:45 -04:00
2017-03-29 23:53:21 -04:00
2017-03-29 23:54:30 -04:00
2017-01-27 12:20:41 -05:00
2017-05-16 17:17:41 +02:00
2016-10-25 14:38:45 -04:00
2017-06-27 08:28:30 +10:00
2016-10-25 14:38:45 -04:00
2017-06-27 08:28:30 +10:00
2016-10-25 14:38:45 -04:00
2017-06-27 08:28:30 +10:00
2016-10-25 14:38:45 -04:00
2017-06-27 08:28:30 +10:00
2016-10-25 14:38:45 -04:00
2017-05-18 09:24:30 -04:00
2016-10-25 14:38:45 -04:00
2017-06-29 12:43:49 -04:00
2016-10-25 14:38:45 -04:00
2017-06-29 12:43:49 -04:00
2017-05-31 16:48:48 -04:00
2017-07-04 10:22:20 -04:00
2017-05-31 16:48:48 -04:00
2017-07-04 10:22:26 -04:00
2017-03-29 23:54:45 -04:00
2017-06-15 11:50:31 -04:00
2017-06-06 16:58:36 -04:00
2017-06-30 14:48:46 -04:00
2016-10-25 14:38:45 -04:00
2017-06-16 09:56:53 +10:00
2016-10-25 14:38:45 -04:00
2017-06-16 09:56:53 +10:00
2016-10-25 14:38:45 -04:00
2017-06-29 12:43:46 -04:00
2017-03-29 23:54:44 -04:00
2017-05-16 17:17:41 +02:00
2016-10-25 14:38:45 -04:00
2017-06-08 10:54:37 -04:00
2017-05-16 17:17:41 +02:00
2017-05-16 17:17:41 +02:00
2017-06-16 09:56:53 +10:00
2017-06-29 12:43:46 -04:00
2017-06-29 12:43:45 -04:00
2017-04-28 17:32:57 -04:00
2017-05-24 17:40:39 -04:00
2017-04-06 13:28:06 -04:00
2017-05-24 17:40:39 -04:00
2017-03-29 23:52:38 -04:00
2017-06-15 11:50:32 -04:00
2017-03-29 23:55:19 -04:00
2017-06-15 11:50:33 -04:00
2017-05-24 17:41:16 -04:00
2016-10-25 14:38:06 -04:00
2016-07-15 12:33:31 -04:00
2017-03-29 23:54:48 -04:00
2017-06-29 12:43:48 -04:00
2017-04-28 17:32:46 -04:00
2017-06-29 12:43:48 -04:00
2017-05-24 17:41:19 -04:00
2016-08-31 15:21:09 -04:00
2017-03-29 23:55:50 -04:00
2016-10-25 14:38:45 -04:00
2017-05-24 18:18:15 -04:00
2016-10-25 14:38:45 -04:00
2017-05-31 14:16:35 -04:00
2017-03-29 23:54:45 -04:00
2017-03-29 23:55:50 -04:00
2016-10-25 14:38:45 -04:00
2017-05-16 17:17:41 +02:00
2016-08-31 15:21:09 -04:00
2017-02-08 17:25:02 -05:00
2017-05-16 17:17:41 +02:00
2016-10-25 14:38:45 -04:00
2017-05-16 17:17:41 +02:00
2017-06-16 09:56:53 +10:00
2016-10-25 14:38:45 -04:00
2017-01-27 12:20:41 -05:00
2016-09-28 16:13:17 -04:00
2017-06-15 11:50:30 -04:00
2017-06-29 12:43:46 -04:00
2017-05-24 17:41:17 -04:00
2017-05-24 17:40:29 -04:00
2017-05-16 17:17:41 +02:00
2016-10-25 14:38:45 -04:00
2017-04-04 13:40:33 -04:00
2016-10-25 14:38:45 -04:00
2017-04-04 13:40:33 -04:00
2016-10-25 14:38:45 -04:00
2017-04-04 13:40:33 -04:00
2016-10-25 14:38:45 -04:00
2017-06-15 11:50:32 -04:00
2017-03-29 23:54:47 -04:00
2017-04-04 13:40:33 -04:00
2016-10-25 14:38:45 -04:00
2017-05-31 14:16:37 -04:00
2016-10-25 14:38:45 -04:00
2017-06-01 16:00:22 -04:00
2017-03-29 23:54:47 -04:00
2017-06-15 11:50:35 -04:00
2017-05-24 17:41:27 -04:00
2017-06-16 09:56:53 +10:00
2017-03-29 23:54:46 -04:00
2017-03-29 23:54:30 -04:00
2017-01-27 11:12:43 -05:00
2017-06-16 09:56:53 +10:00
2017-03-29 23:53:31 -04:00
2017-05-24 17:40:26 -04:00