Qais Yousef
ab6e10de9d
ANDROID: cgroup/cpuset: Fix suspicous RCU usage WARNING
task_cs() is called from cpuset_cpus_allowed_fallback() without
holding the read_rcu_lock() causing the below splat.
Fix by holding the rcu_read_lock().
[ 0.090199] =============================
[ 0.090399] WARNING: suspicious RCU usage
[ 0.090600] 5.10.19-00939-gc3bf09a68b63-dirty #368 Not tainted
[ 0.090837] -----------------------------
[ 0.091000] include/linux/cgroup.h:494 suspicious rcu_dereference_check() usage!
[ 0.091246]
[ 0.091246] other info that might help us debug this:
[ 0.091246]
[ 0.091499]
[ 0.091499] rcu_scheduler_active = 1, debug_locks = 1
[ 0.091738] 4 locks held by swapper/0/1:
[ 0.091902] #0: ffff800014e3f510 (cpu_add_remove_lock){+.+.}-{3:3}, at: cpu_up+0x100/0x190
[ 0.092726] #1: ffff800014e3f6b0 (cpu_hotplug_lock){++++}-{0:0}, at: _cpu_up+0x4c/0x1c8
[ 0.093540] #2: ffff800014e47478 (smpboot_threads_lock){+.+.}-{3:3}, at: smpboot_create_threads+0x34/0xc0
[ 0.094399] #3: ffff0008001d0878 (&p->pi_lock){....}-{2:2}, at: try_to_wake_up+0x58/0x828
[ 0.095199]
[ 0.095199] stack backtrace:
[ 0.095425] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.10.19-00939-gc3bf09a68b63-dirty #368
[ 0.095670] Hardware name: Foundation-v8A (DT)
[ 0.095834] Call trace:
[ 0.096099] dump_backtrace+0x0/0x1a8
[ 0.096353] show_stack+0x18/0x68
[ 0.096571] dump_stack+0xf8/0x168
[ 0.096817] lockdep_rcu_suspicious+0xe4/0xf8
[ 0.097063] cpuset_cpus_allowed_fallback+0x184/0x1f8
[ 0.097299] select_fallback_rq+0x24c/0x2c0
[ 0.097526] try_to_wake_up+0x1e4/0x828
[ 0.097740] wake_up_process+0x18/0x28
[ 0.097999] kthread_park+0x74/0xc8
[ 0.098209] __smpboot_create_thread.part.0+0x90/0x168
[ 0.098486] smpboot_create_threads+0x84/0xc0
[ 0.098699] cpuhp_invoke_callback+0xe8/0xe50
[ 0.098947] _cpu_up+0xe0/0x1c8
[ 0.099126] cpu_up+0x120/0x190
[ 0.099399] bringup_nonboot_cpus+0x94/0xd0
[ 0.099659] smp_init+0x30/0x8c
[ 0.099873] kernel_init_freeable+0x1d4/0x328
[ 0.100099] kernel_init+0x14/0x118
[ 0.100339] ret_from_fork+0x10/0x34
Bug: 178507149
Fixes: 210463b39c ("FROMLIST: cpuset: Don't use the cpu_possible_mask as a last resort for cgroup v1")
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Change-Id: Ib7688e7d0c37cbf119d806ce79157a467b9e35f6
2021-03-03 09:02:19 +00:00
..
2021-02-26 10:12:59 +01:00
2021-03-03 09:02:19 +00:00
2020-04-07 10:43:42 -07:00
2020-10-01 14:44:08 +01:00
2021-01-25 12:21:02 -08:00
2020-11-04 18:06:14 +01:00
2021-01-13 10:28:55 +01:00
2020-09-11 09:33:54 -07:00
2021-02-25 15:16:39 -08:00
2020-10-16 11:11:19 -07:00
2020-10-16 11:11:19 -07:00
2021-02-08 20:05:12 -08:00
2021-03-02 17:34:28 -08:00
2021-02-25 13:16:22 +01:00
2021-01-19 18:27:28 +01:00
2021-03-01 18:50:27 +00:00
2021-02-26 19:23:02 +00:00
2021-02-18 11:21:01 +01:00
2020-03-25 11:50:48 +01:00
2020-10-16 11:11:19 -07:00
2020-07-16 12:35:15 -07:00
2020-12-30 11:54:18 +01:00
2020-12-30 11:54:18 +01:00
2020-12-30 11:54:18 +01:00
2020-08-26 09:10:39 -04:00
2020-08-17 20:26:58 -04:00
2020-08-23 17:36:59 -05:00
2020-08-04 14:20:26 -07:00
2020-07-30 11:15:58 -07:00
2020-10-13 09:17:34 -07:00
2021-02-16 18:09:38 +00:00
2020-08-23 17:36:59 -05:00
2020-02-04 03:05:26 +00:00
2020-06-11 15:14:36 +02:00
2020-09-01 09:58:03 +02:00
2021-02-18 13:11:30 +00:00
2020-08-12 10:58:01 -07:00
2020-04-15 11:21:54 +02:00
2020-05-20 14:44:21 -05:00
2019-05-21 11:52:39 +02:00
2021-01-30 13:55:18 +01:00
2020-04-07 10:43:42 -07:00
2020-11-19 11:58:16 -08:00
2021-01-22 18:02:09 +00:00
2019-10-06 09:11:37 -06:00
2021-01-30 14:29:02 +01:00
2020-06-06 23:42:01 +09:00
2020-10-13 09:17:34 -07:00
2020-11-02 12:14:19 -08:00
2019-07-12 11:05:40 -07:00
2020-12-03 16:50:04 +00:00
2020-10-16 11:11:19 -07:00
2021-01-14 16:31:46 +00:00
2021-01-09 13:46:24 +01:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-12-08 14:37:36 +01:00
2019-11-12 11:35:32 +01:00
2020-08-12 10:58:02 -07:00
2021-02-03 23:28:37 +01:00
2019-09-06 23:58:44 +02:00
2020-10-16 11:11:18 -07:00
2020-01-08 16:32:55 +00:00
2020-10-05 13:37:03 +02:00
2019-05-24 20:16:01 +02:00
2020-08-12 10:58:01 -07:00
2021-02-10 09:29:16 +01:00
2019-05-30 11:26:39 -07:00
2021-02-08 20:05:12 -08:00
2020-04-27 02:07:40 -04:00
2021-01-14 16:28:57 +00:00
2019-08-05 18:39:56 -04:00
2019-08-05 18:39:56 -04:00
2019-05-24 17:27:11 +02:00
2021-02-23 16:42:21 -08:00
2020-09-01 09:58:03 +02:00
2020-07-08 11:14:22 +02:00
2020-09-04 17:51:55 +10:00
2020-11-14 11:26:04 -08:00
2020-10-29 17:22:59 -05:00
2020-10-16 11:11:19 -07:00
2021-01-13 10:28:55 +01:00
2020-02-04 03:05:26 +00:00
2020-11-17 12:53:22 -08:00
2020-10-16 11:11:19 -07:00
2020-11-15 14:37:09 +01:00
2020-07-27 14:31:12 -04:00
2020-10-16 11:11:22 -07:00
2020-10-16 11:11:18 -07:00
2019-12-25 10:41:20 +01:00
2020-08-24 18:38:38 -07:00
2021-01-07 17:56:54 -08:00
2020-12-21 18:48:41 +00:00
2021-01-22 10:05:52 -08:00
2021-01-14 11:39:55 -08:00
2021-02-07 15:37:17 +01:00
2020-12-21 17:48:06 +00:00
2020-09-19 13:13:39 -07:00
2020-09-18 14:24:16 +01:00
2020-10-02 21:18:25 +02:00
2020-12-08 19:07:21 +00:00
2020-10-18 09:27:10 -07:00
2020-10-29 06:32:38 +01:00
2020-01-09 16:42:29 -07:00
2020-09-21 12:13:45 +02:00
2020-10-17 15:05:30 -06:00
2020-10-02 19:11:12 -07:00
2019-05-21 11:52:39 +02:00
2020-06-29 12:01:45 -07:00
2020-10-29 17:22:59 -05:00
2019-12-18 18:07:31 +01:00
2020-04-07 21:51:27 +02:00
2020-10-06 10:31:52 -07:00
2020-02-07 15:34:12 +01:00
2020-10-16 11:11:19 -07:00
2019-05-21 10:50:45 +02:00
2020-06-04 19:06:24 -07:00
2020-07-07 11:58:59 -05:00
2020-04-27 02:07:40 -04:00
2020-05-09 13:57:12 +02:00
2020-08-17 09:39:18 -07:00
2019-04-19 09:46:05 -07:00
2021-02-04 23:55:45 +00:00
2019-04-16 16:55:15 +02:00
2021-02-08 20:05:12 -08:00