Paul E. McKenney
4e79752c25
sched: Mark RCU reader in sched_show_task()
When sched_show_task() is invoked from try_to_freeze_tasks(), there is
no RCU read-side critical section, resulting in the following splat:
[ 125.780730] ===============================
[ 125.780766] [ INFO: suspicious RCU usage. ]
[ 125.780804] 3.7.0-rc3+ #988 Not tainted
[ 125.780838] -------------------------------
[ 125.780875] /home/rafael/src/linux/kernel/sched/core.c:4497 suspicious rcu_dereference_check() usage!
[ 125.780946]
[ 125.780946] other info that might help us debug this:
[ 125.780946]
[ 125.781031]
[ 125.781031] rcu_scheduler_active = 1, debug_locks = 0
[ 125.781087] 4 locks held by s2ram/4211:
[ 125.781120] #0: (&buffer->mutex){+.+.+.}, at: [<ffffffff811e2acf>] sysfs_write_file+0x3f/0x160
[ 125.781233] #1: (s_active#94){.+.+.+}, at: [<ffffffff811e2b58>] sysfs_write_file+0xc8/0x160
[ 125.781339] #2: (pm_mutex){+.+.+.}, at: [<ffffffff81090a81>] pm_suspend+0x81/0x230
[ 125.781439] #3: (tasklist_lock){.?.?..}, at: [<ffffffff8108feed>] try_to_freeze_tasks+0x2cd/0x3f0
[ 125.781543]
[ 125.781543] stack backtrace:
[ 125.781584] Pid: 4211, comm: s2ram Not tainted 3.7.0-rc3+ #988
[ 125.781632] Call Trace:
[ 125.781662] [<ffffffff810a3c73>] lockdep_rcu_suspicious+0x103/0x140
[ 125.781719] [<ffffffff8107cf21>] sched_show_task+0x121/0x180
[ 125.781770] [<ffffffff8108ffb4>] try_to_freeze_tasks+0x394/0x3f0
[ 125.781823] [<ffffffff810903b5>] freeze_kernel_threads+0x25/0x80
[ 125.781876] [<ffffffff81090b65>] pm_suspend+0x165/0x230
[ 125.781924] [<ffffffff8108fa29>] state_store+0x99/0x100
[ 125.781975] [<ffffffff812f5867>] kobj_attr_store+0x17/0x20
[ 125.782038] [<ffffffff811e2b71>] sysfs_write_file+0xe1/0x160
[ 125.782091] [<ffffffff811667a6>] vfs_write+0xc6/0x180
[ 125.782138] [<ffffffff81166ada>] sys_write+0x5a/0xa0
[ 125.782185] [<ffffffff812ff6ae>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[ 125.782242] [<ffffffff81669dd2>] system_call_fastpath+0x16/0x1b
This commit therefore adds the needed RCU read-side critical section.
Reported-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2012-11-16 10:05:58 -08:00
..
2012-10-13 11:16:58 +09:00
2012-10-13 10:20:11 +09:00
2012-10-10 08:57:26 +02:00
2012-09-17 20:25:51 +02:00
2012-11-16 10:05:58 -08:00
2012-10-12 22:17:48 +09:00
2012-10-07 21:04:56 +09:00
2012-10-12 20:15:09 -04:00
2012-07-20 09:07:37 +01:00
2012-08-15 12:55:22 +02:00
2012-10-12 00:32:02 -04:00
2012-10-09 23:33:37 -04:00
2012-10-12 00:32:02 -04:00
2012-10-12 00:32:02 -04:00
2012-10-12 20:15:09 -04:00
2012-05-15 14:59:24 -07:00
2012-09-14 12:01:16 -07:00
2012-10-02 10:52:28 -07:00
2012-05-21 23:52:30 -04:00
2012-05-31 17:49:27 -07:00
2012-10-09 16:22:15 +09:00
2012-07-24 13:53:28 +02:00
2011-11-06 19:44:47 -08:00
2012-08-23 22:54:18 -07:00
2012-03-28 18:30:03 +01:00
2012-10-02 20:25:04 -07:00
2012-04-19 15:06:55 -07:00
2012-10-10 12:02:25 +09:00
2012-03-04 23:08:54 +01:00
2012-03-29 11:37:17 +02:00
2012-07-24 16:02:57 +02:00
2012-05-03 03:29:33 -07:00
2012-07-11 23:34:39 +02:00
2012-04-25 12:39:25 +02:00
2012-04-13 13:15:16 -04:00
2012-04-10 11:00:30 +02:00
2012-08-06 19:00:35 +03:00
2012-05-29 16:22:32 -07:00
2012-05-31 17:49:32 -07:00
2012-09-13 17:56:13 +02:00
2012-03-23 13:18:57 +01:00
2012-10-06 03:05:19 +09:00
2012-04-11 18:24:37 -03:00
2012-10-12 13:35:07 -04:00
2012-09-13 22:52:11 -04:00
2012-10-23 14:54:08 -07:00
2012-10-13 10:05:52 +09:00
2011-10-31 09:20:12 -04:00
2012-05-29 23:28:41 -04:00
2011-10-31 09:20:12 -04:00
2012-09-13 17:00:44 +02:00
2012-10-14 13:39:34 -07:00
2012-10-10 20:01:22 +10:30
2012-10-19 17:30:40 -07:00
2012-10-19 17:30:40 -07:00
2012-10-19 17:30:40 -07:00
2011-10-31 09:20:12 -04:00
2012-03-01 10:28:03 +01:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2012-03-29 19:52:46 +08:00
2012-07-30 17:25:13 -07:00
2012-05-04 17:28:18 -07:00
2012-10-19 14:07:47 -07:00
2012-08-14 21:49:25 -07:00
2011-12-15 14:56:19 +01:00
2011-10-31 09:20:12 -04:00
2012-10-16 18:17:44 -07:00
2011-10-31 09:20:12 -04:00
2012-08-03 14:47:17 +10:00
2011-10-31 09:20:11 -04:00
2012-10-23 14:54:08 -07:00
2012-10-23 14:54:08 -07:00
2012-10-23 14:54:08 -07:00
2012-11-13 14:08:34 -08:00
2012-11-16 09:59:58 -08:00
2012-11-16 10:05:57 -08:00
2012-11-16 10:05:57 -08:00
2012-11-16 10:05:56 -08:00
2012-11-16 10:05:57 -08:00
2012-06-13 21:16:42 +02:00
2012-05-29 16:22:27 -07:00
2012-10-06 03:05:31 +09:00
2011-12-06 08:16:49 +01:00
2011-12-14 14:54:22 -08:00
2011-12-11 10:33:18 -08:00
2012-03-28 18:30:03 +01:00
2012-04-18 12:24:52 +10:00
2012-04-05 17:15:55 -07:00
2012-10-06 03:05:16 +09:00
2012-06-05 17:27:14 +02:00
2012-08-13 17:01:07 +02:00
2012-08-13 17:01:07 +02:00
2012-10-01 10:43:39 -07:00
2012-03-23 13:18:57 +01:00
2012-11-16 09:59:58 -08:00
2011-10-31 09:20:12 -04:00
2011-11-06 19:44:47 -08:00
2012-05-31 17:49:32 -07:00
2012-10-19 18:51:17 -07:00
2012-07-31 18:42:40 -07:00
2012-10-09 16:22:14 +09:00
2012-09-13 16:47:34 +02:00
2012-10-06 03:05:31 +09:00
2012-09-24 12:38:06 -04:00
2012-10-09 21:27:14 +02:00
2012-02-24 10:05:59 +01:00
2012-09-18 01:01:32 -07:00
2012-05-03 03:28:41 -07:00
2011-10-31 09:20:12 -04:00
2012-09-18 01:01:37 -07:00
2011-10-31 09:20:12 -04:00
2012-09-18 01:01:37 -07:00
2011-11-06 19:44:47 -08:00
2012-04-07 16:55:51 -07:00
2011-12-21 10:07:39 +01:00
2012-08-13 17:01:07 +02:00
2012-10-02 09:54:49 -07:00