Daniel Bristot de Oliveira
d60df1c089
cgroup: Disable IRQs while holding css_set_lock
...
commit 82d6489d0f
upstream.
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 >
Signed-off-by: Zubin Mithra <zsm@chromium.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-09-06 10:18:11 +02:00
..
2019-08-04 09:34:46 +02:00
2016-09-24 10:07:42 +02:00
2018-12-13 09:21:29 +01:00
2019-08-25 10:52:51 +02:00
2018-01-23 19:50:10 +01:00
2019-05-16 19:45:04 +02:00
2015-11-11 17:36:04 +01:00
2019-08-04 09:34:59 +02:00
2019-04-03 06:23:24 +02:00
2018-11-21 09:27:35 +01:00
2019-06-11 12:24:04 +02:00
2019-08-04 09:35:02 +02:00
2019-08-04 09:34:47 +02:00
2019-08-04 09:34:50 +02:00
2015-10-21 15:18:35 +01:00
2018-01-10 09:27:08 +01:00
2018-02-16 20:09:45 +01:00
2015-08-06 16:14:53 -04:00
2015-11-04 08:23:51 -05:00
2018-09-26 08:35:08 +02:00
2018-05-30 07:49:16 +02:00
2015-11-04 08:23:51 -05:00
2019-06-11 12:23:58 +02:00
2018-08-06 16:24:38 +02:00
2018-11-21 09:27:35 +01:00
2017-01-06 11:16:14 +01:00
2015-12-03 10:18:21 -05:00
2015-12-03 10:18:21 -05:00
2019-09-06 10:18:11 +02:00
2015-06-04 23:57:18 +02:00
2015-11-10 12:06:23 +01:00
2015-09-03 02:42:20 +02:00
2019-07-10 09:56:36 +02:00
2017-10-12 11:27:35 +02:00
2019-08-04 09:35:01 +02:00
2015-04-12 21:03:31 +02:00
2019-02-06 19:43:07 +01:00
2017-07-21 07:44:56 +02:00
2019-08-04 09:35:02 +02:00
2016-02-25 12:01:16 -08:00
2019-06-22 08:18:22 +02:00
2018-01-10 09:27:10 +01:00
2019-02-20 10:13:14 +01:00
2015-11-23 09:44:58 +01:00
2017-12-16 10:33:55 +01:00
2016-02-25 12:01:16 -08:00
2015-05-12 09:46:00 +02:00
2015-11-06 17:50:42 -08:00
2016-09-24 10:07:36 +02:00
2015-09-10 13:29:01 -07:00
2015-11-06 17:50:42 -08:00
2015-10-23 17:55:10 +09:00
2019-04-27 09:34:02 +02:00
2015-09-10 13:29:01 -07:00
2018-09-09 20:04:34 +02:00
2015-09-11 15:21:34 -07:00
2017-03-12 06:37:26 +01:00
2019-01-13 10:05:32 +01:00
2015-10-21 15:18:36 +01:00
2019-08-06 18:28:25 +02:00
2015-09-01 08:40:25 -07:00
2019-08-04 09:34:51 +02:00
2017-07-05 14:37:19 +02:00
2015-11-09 15:53:39 -08:00
2019-08-04 09:34:42 +02:00
2018-04-13 19:50:03 +02:00
2018-02-25 11:03:44 +01:00
2019-07-10 09:56:42 +02:00
2015-09-10 13:29:01 -07:00
2018-05-30 07:49:00 +02:00
2018-04-24 09:32:05 +02:00
2018-07-25 10:18:27 +02:00
2019-06-11 12:24:10 +02:00
2015-11-06 17:50:42 -08:00
2015-10-20 10:23:55 +02:00
2015-12-12 10:15:34 -08:00
2015-11-05 19:34:48 -08:00
2019-06-22 08:18:18 +02:00
2016-04-12 09:08:58 -07:00
2019-06-22 08:18:17 +02:00
2015-09-05 13:46:58 -07:00
2015-10-06 11:25:01 -07:00
2018-05-16 10:06:47 +02:00
2018-01-10 09:27:10 +01:00
2018-09-09 20:04:35 +02:00
2018-09-09 20:04:35 +02:00
2017-01-06 11:16:16 +01:00
2017-11-15 17:13:11 +01:00
2018-05-30 07:49:04 +02:00