Daniel Bristot de Oliveira
82d6489d0f
cgroup: Disable IRQs while holding css_set_lock
While testing the deadline scheduler + cgroup setup I hit this
warning.
[ 132.612935] ------------[ cut here ]------------
[ 132.612951] WARNING: CPU: 5 PID: 0 at kernel/softirq.c:150 __local_bh_enable_ip+0x6b/0x80
[ 132.612952] Modules linked in: (a ton of modules...)
[ 132.612981] CPU: 5 PID: 0 Comm: swapper/5 Not tainted 4.7.0-rc2 #2
[ 132.612981] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.8.2-20150714_191134- 04/01/2014
[ 132.612982] 0000000000000086 45c8bb5effdd088b ffff88013fd43da0 ffffffff813d229e
[ 132.612984] 0000000000000000 0000000000000000 ffff88013fd43de0 ffffffff810a652b
[ 132.612985] 00000096811387b5 0000000000000200 ffff8800bab29d80 ffff880034c54c00
[ 132.612986] Call Trace:
[ 132.612987] <IRQ> [<ffffffff813d229e>] dump_stack+0x63/0x85
[ 132.612994] [<ffffffff810a652b>] __warn+0xcb/0xf0
[ 132.612997] [<ffffffff810e76a0>] ? push_dl_task.part.32+0x170/0x170
[ 132.612999] [<ffffffff810a665d>] warn_slowpath_null+0x1d/0x20
[ 132.613000] [<ffffffff810aba5b>] __local_bh_enable_ip+0x6b/0x80
[ 132.613008] [<ffffffff817d6c8a>] _raw_write_unlock_bh+0x1a/0x20
[ 132.613010] [<ffffffff817d6c9e>] _raw_spin_unlock_bh+0xe/0x10
[ 132.613015] [<ffffffff811388ac>] put_css_set+0x5c/0x60
[ 132.613016] [<ffffffff8113dc7f>] cgroup_free+0x7f/0xa0
[ 132.613017] [<ffffffff810a3912>] __put_task_struct+0x42/0x140
[ 132.613018] [<ffffffff810e776a>] dl_task_timer+0xca/0x250
[ 132.613027] [<ffffffff810e76a0>] ? push_dl_task.part.32+0x170/0x170
[ 132.613030] [<ffffffff8111371e>] __hrtimer_run_queues+0xee/0x270
[ 132.613031] [<ffffffff81113ec8>] hrtimer_interrupt+0xa8/0x190
[ 132.613034] [<ffffffff81051a58>] local_apic_timer_interrupt+0x38/0x60
[ 132.613035] [<ffffffff817d9b0d>] smp_apic_timer_interrupt+0x3d/0x50
[ 132.613037] [<ffffffff817d7c5c>] apic_timer_interrupt+0x8c/0xa0
[ 132.613038] <EOI> [<ffffffff81063466>] ? native_safe_halt+0x6/0x10
[ 132.613043] [<ffffffff81037a4e>] default_idle+0x1e/0xd0
[ 132.613044] [<ffffffff810381cf>] arch_cpu_idle+0xf/0x20
[ 132.613046] [<ffffffff810e8fda>] default_idle_call+0x2a/0x40
[ 132.613047] [<ffffffff810e92d7>] cpu_startup_entry+0x2e7/0x340
[ 132.613048] [<ffffffff81050235>] start_secondary+0x155/0x190
[ 132.613049] ---[ end trace f91934d162ce9977 ]---
The warn is the spin_(lock|unlock)_bh(&css_set_lock) in the interrupt
context. Converting the spin_lock_bh to spin_lock_irq(save) to avoid
this problem - and other problems of sharing a spinlock with an
interrupt.
Cc: Tejun Heo <tj@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Juri Lelli <juri.lelli@arm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: cgroups@vger.kernel.org
Cc: stable@vger.kernel.org # 4.5+
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Rik van Riel <riel@redhat.com>
Reviewed-by: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com>
Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Acked-by: Zefan Li <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2016-06-23 17:23:12 -04:00
..
2016-05-25 17:05:40 -07:00
2015-06-16 11:04:29 +01:00
2016-02-22 08:51:37 +01:00
2016-05-25 17:05:40 -07:00
2015-12-04 22:46:25 +01:00
2016-05-20 17:58:30 -07:00
2016-05-17 12:06:35 +02:00
2016-05-24 12:55:26 -07:00
2016-04-28 13:35:48 +01:00
2016-05-20 17:58:30 -07:00
2016-05-19 19:12:14 -07:00
2016-05-25 17:11:43 -07:00
2016-05-19 19:12:14 -07:00
2016-05-22 19:40:39 -07:00
2015-10-21 15:18:35 +01:00
2015-04-11 22:27:55 -04:00
2015-11-19 17:51:48 +01:00
2016-01-22 18:04:28 -05:00
2016-04-04 09:46:47 -04:00
2016-04-10 17:11:51 -04:00
2016-05-18 18:46:55 -07:00
2015-12-24 11:09:39 -05:00
2016-02-08 11:25:39 -05:00
2016-05-18 18:46:55 -07:00
2015-04-15 16:35:22 -07:00
2015-12-03 10:24:08 -05:00
2015-12-14 14:54:37 -05:00
2016-06-23 17:23:12 -04:00
2015-06-04 23:57:18 +02:00
2015-11-24 09:56:43 +01:00
2015-09-03 02:42:20 +02:00
2016-05-06 14:58:25 +02:00
2016-05-19 19:12:14 -07:00
2016-01-14 16:00:49 -08:00
2016-01-14 16:00:49 -08:00
2015-04-12 21:03:31 +02:00
2016-05-23 17:04:14 -07:00
2015-09-10 13:29:01 -07:00
2016-05-23 17:04:14 -07:00
2014-10-21 23:44:20 +02:00
2016-01-20 17:09:18 -08:00
2016-05-22 17:21:27 -07:00
2015-04-15 16:35:22 -07:00
2016-03-22 15:36:02 -07:00
2015-11-23 09:44:58 +01:00
2015-11-23 09:44:58 +01:00
2016-03-15 16:55:16 -07:00
2016-01-20 17:09:18 -08:00
2015-05-12 09:46:00 +02:00
2016-04-28 19:34:04 -07:00
2016-05-23 17:04:14 -07:00
2016-05-23 17:04:14 -07:00
2016-01-20 17:09:18 -08:00
2016-05-23 17:04:14 -07:00
2015-10-23 17:55:10 +09:00
2015-08-04 10:16:54 +02:00
2015-12-07 16:59:37 -08:00
2015-09-04 16:54:41 -07:00
2016-02-09 11:54:23 +01:00
2016-05-23 17:04:14 -07:00
2015-09-11 15:21:34 -07:00
2016-04-04 10:26:41 +02:00
2016-04-11 22:43:43 +01:00
2016-04-01 15:00:10 +02:00
2015-09-01 08:40:25 -07:00
2016-02-16 13:04:58 -05:00
2016-05-19 19:12:14 -07:00
2016-05-20 17:58:30 -07:00
2015-11-09 15:53:39 -08:00
2014-12-16 15:53:03 -08:00
2016-01-31 15:44:04 -08:00
2016-03-22 15:36:02 -07:00
2016-03-22 15:36:02 -07:00
2015-01-17 10:02:23 +13:00
2015-09-10 13:29:01 -07:00
2016-01-22 18:04:28 -05:00
2016-04-14 12:56:09 -07:00
2016-05-19 10:02:26 -07:00
2016-05-23 17:04:14 -07:00
2016-03-15 13:50:29 -07:00
2016-03-01 20:36:56 +01:00
2016-03-01 20:36:56 +01:00
2016-03-25 16:37:42 -07:00
2014-12-13 12:42:48 -08:00
2016-01-16 11:17:24 -08:00
2015-12-01 14:00:53 -05:00
2016-05-23 17:04:14 -07:00
2016-05-20 17:58:30 -07:00
2016-05-25 17:05:40 -07:00
2015-09-05 13:46:58 -07:00
2016-04-23 20:13:25 -04:00
2016-04-21 13:47:04 -07:00
2016-03-22 15:36:02 -07:00
2016-02-29 09:53:09 +01:00
2014-12-05 17:19:27 -06:00
2016-01-04 10:27:55 -05:00
2014-12-17 12:31:40 -08:00
2014-12-04 14:34:47 -05:00
2016-03-17 15:09:34 -07:00
2016-03-02 10:28:47 -05:00
2016-05-19 19:12:14 -07:00