Tetsuo Handa
7f1a169b88
sched/fair: Fix RCU stall upon -ENOMEM in sched_create_group()
...
When alloc_fair_sched_group() in sched_create_group() fails,
free_sched_group() is called, and free_fair_sched_group() is called by
free_sched_group(). Since destroy_cfs_bandwidth() is called by
free_fair_sched_group() without calling init_cfs_bandwidth(),
RCU stall occurs at hrtimer_cancel():
INFO: rcu_sched self-detected stall on CPU { 1} (t=60000 jiffies g=13074 c=13073 q=0)
Task dump for CPU 1:
(fprintd) R running task 0 6249 1 0x00000088
...
Call Trace:
<IRQ> [<ffffffff81094988>] sched_show_task+0xa8/0x110
[<ffffffff81097acd>] dump_cpu_task+0x3d/0x50
[<ffffffff810c3a80>] rcu_dump_cpu_stacks+0x90/0xd0
[<ffffffff810c7751>] rcu_check_callbacks+0x491/0x700
[<ffffffff810cbf2b>] update_process_times+0x4b/0x80
[<ffffffff810db046>] tick_sched_handle.isra.20+0x36/0x50
[<ffffffff810db0a2>] tick_sched_timer+0x42/0x70
[<ffffffff810ccb19>] __run_hrtimer+0x69/0x1a0
[<ffffffff810db060>] ? tick_sched_handle.isra.20+0x50/0x50
[<ffffffff810ccedf>] hrtimer_interrupt+0xef/0x230
[<ffffffff810452cb>] local_apic_timer_interrupt+0x3b/0x70
[<ffffffff8164a465>] smp_apic_timer_interrupt+0x45/0x60
[<ffffffff816485bd>] apic_timer_interrupt+0x6d/0x80
<EOI> [<ffffffff810cc588>] ? lock_hrtimer_base.isra.23+0x18/0x50
[<ffffffff81193cf1>] ? __kmalloc+0x211/0x230
[<ffffffff810cc9d2>] hrtimer_try_to_cancel+0x22/0xd0
[<ffffffff81193cf1>] ? __kmalloc+0x211/0x230
[<ffffffff810ccaa2>] hrtimer_cancel+0x22/0x30
[<ffffffff810a3cb5>] free_fair_sched_group+0x25/0xd0
[<ffffffff8108df46>] free_sched_group+0x16/0x40
[<ffffffff810971bb>] sched_create_group+0x4b/0x80
[<ffffffff810aa383>] sched_autogroup_create_attach+0x43/0x1c0
[<ffffffff8107dc9c>] sys_setsid+0x7c/0x110
[<ffffffff81647729>] system_call_fastpath+0x12/0x17
Check whether init_cfs_bandwidth() was called before calling
destroy_cfs_bandwidth().
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
[ Move the check into destroy_cfs_bandwidth() to aid compilability. ]
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Paul Turner <pjt@google.com>
Cc: Ben Segall <bsegall@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/201412252210.GCC30204.SOMVFFOtQJFLOH@I-love.SAKURA.ne.jp
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-01-09 11:19:00 +01:00
..
2014-12-05 21:47:32 -08:00
2014-08-08 16:30:24 -07:00
2014-10-14 02:18:25 +02:00
2014-12-19 13:15:24 -08:00
2014-12-13 12:42:51 -08:00
2014-12-13 13:33:07 +01:00
2014-10-28 10:55:08 +01:00
2014-12-19 22:55:06 +01:00
2014-12-13 14:04:41 -08:00
2014-11-13 10:39:04 -08:00
2015-01-09 11:19:00 +01:00
2014-12-19 13:29:20 -08:00
2014-12-18 20:28:33 -08:00
2014-10-09 22:26:04 -04:00
2014-10-09 22:26:04 -04:00
2014-12-13 12:42:53 -08:00
2014-09-23 16:37:53 -04:00
2014-12-13 13:41:28 -08:00
2014-09-23 16:37:51 -04:00
2014-10-19 16:25:56 -07:00
2014-11-19 13:01:26 -05:00
2014-06-04 16:54:14 -07:00
2014-08-08 15:57:18 -07:00
2014-07-24 21:53:47 +10:00
2014-07-15 11:05:09 -04:00
2014-11-18 02:49:52 -05:00
2014-09-06 12:58:18 +02:00
2014-10-28 10:46:05 +01:00
2014-11-03 19:21:01 -08:00
2014-12-11 18:57:19 -08:00
2014-08-25 15:42:19 -07:00
2014-07-23 10:18:06 -07:00
2014-06-04 16:54:15 -07:00
2014-12-14 15:23:32 -08:00
2014-11-19 15:25:26 -05:00
2014-12-13 12:42:45 -08:00
2014-10-21 23:44:20 +02:00
2014-10-26 16:16:18 +01:00
2014-12-09 16:58:40 -06:00
2014-06-04 16:54:15 -07:00
2014-10-29 11:18:18 -04:00
2014-10-14 02:18:16 +02:00
2014-09-10 15:42:12 -07:00
2014-07-16 14:57:13 +02:00
2014-12-13 12:42:51 -08:00
2014-12-10 17:41:17 -08:00
2014-12-11 17:30:55 -08:00
2014-04-25 12:00:49 -07:00
2014-10-09 22:25:51 -04:00
2014-06-04 16:54:15 -07:00
2014-12-10 17:41:04 -08:00
2014-12-18 20:55:41 -08:00
2014-04-24 10:26:39 +02:00
2014-12-04 14:34:54 -05:00
2014-12-10 17:41:10 -08:00
2014-12-18 12:38:51 +10:30
2014-12-16 15:53:03 -08:00
2014-12-16 15:53:03 -08:00
2014-06-06 16:08:13 -07:00
2014-12-10 17:41:10 -08:00
2014-09-26 00:00:06 -07:00
2014-04-12 14:49:50 -07:00
2014-10-14 02:18:22 +02:00
2014-10-14 02:27:06 +02:00
2014-12-10 09:34:43 -08:00
2014-10-15 07:48:18 +02:00
2014-10-28 10:56:24 +01:00
2014-11-03 19:20:34 -08:00
2014-12-13 12:42:48 -08:00
2014-06-04 16:54:15 -07:00
2014-12-13 12:42:51 -08:00
2014-11-18 00:58:53 +01:00
2014-12-10 17:41:10 -08:00
2014-12-16 12:53:59 -08:00
2014-07-17 09:35:17 -04:00
2014-11-19 13:01:25 -05:00
2014-08-08 15:57:18 -07:00
2014-09-16 13:41:06 -07:00
2014-06-21 00:15:26 -04:00
2014-07-23 10:18:05 -07:00
2014-12-05 17:19:27 -06:00
2014-12-17 12:31:40 -08:00
2014-08-26 13:45:45 -04:00
2014-12-17 12:31:40 -08:00
2014-06-06 16:08:16 -07:00
2014-12-04 14:34:47 -05:00
2014-10-15 07:48:18 +02:00
2014-05-20 10:59:32 -04:00
2014-12-08 12:39:16 -05:00