Yang Shi
62c6c61adb
arm64: replace read_lock to rcu lock in call_break_hook
BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:917
in_atomic(): 0, irqs_disabled(): 128, pid: 342, name: perf
1 lock held by perf/342:
#0: (break_hook_lock){+.+...}, at: [<ffffffc0000851ac>] call_break_hook+0x34/0xd0
irq event stamp: 62224
hardirqs last enabled at (62223): [<ffffffc00010b7bc>] __call_rcu.constprop.59+0x104/0x270
hardirqs last disabled at (62224): [<ffffffc0000fbe20>] vprintk_emit+0x68/0x640
softirqs last enabled at (0): [<ffffffc000097928>] copy_process.part.8+0x428/0x17f8
softirqs last disabled at (0): [< (null)>] (null)
CPU: 0 PID: 342 Comm: perf Not tainted 4.1.6-rt5 #4
Hardware name: linux,dummy-virt (DT)
Call trace:
[<ffffffc000089968>] dump_backtrace+0x0/0x128
[<ffffffc000089ab0>] show_stack+0x20/0x30
[<ffffffc0007030d0>] dump_stack+0x7c/0xa0
[<ffffffc0000c878c>] ___might_sleep+0x174/0x260
[<ffffffc000708ac8>] __rt_spin_lock+0x28/0x40
[<ffffffc000708db0>] rt_read_lock+0x60/0x80
[<ffffffc0000851a8>] call_break_hook+0x30/0xd0
[<ffffffc000085a70>] brk_handler+0x30/0x98
[<ffffffc000082248>] do_debug_exception+0x50/0xb8
Exception stack(0xffffffc00514fe30 to 0xffffffc00514ff50)
fe20: 00000000 00000000 c1594680 0000007f
fe40: ffffffff ffffffff 92063940 0000007f 0550dcd8 ffffffc0 00000000 00000000
fe60: 0514fe70 ffffffc0 000be1f8 ffffffc0 0514feb0 ffffffc0 0008948c ffffffc0
fe80: 00000004 00000000 0514fed0 ffffffc0 ffffffff ffffffff 9282a948 0000007f
fea0: 00000000 00000000 9282b708 0000007f c1592820 0000007f 00083914 ffffffc0
fec0: 00000000 00000000 00000010 00000000 00000064 00000000 00000001 00000000
fee0: 005101e0 00000000 c1594680 0000007f c1594740 0000007f ffffffd8 ffffff80
ff00: 00000000 00000000 00000000 00000000 c1594770 0000007f c1594770 0000007f
ff20: 00665e10 00000000 7f7f7f7f 7f7f7f7f 01010101 01010101 00000000 00000000
ff40: 928e4cc0 0000007f 91ff11e8 0000007f
call_break_hook is called in atomic context (hard irq disabled), so replace
the sleepable lock to rcu lock, replace relevant list operations to rcu
version and call synchronize_rcu() in unregister_break_hook().
And, replace write lock to spinlock in {un}register_break_hook.
Signed-off-by: Yang Shi <yang.shi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-10-06 19:10:28 +01:00
..
2015-06-19 14:54:10 +01:00
2012-09-17 13:42:21 +01:00
2015-05-27 13:22:24 +01:00
2015-08-04 18:52:09 +01:00
2014-05-29 09:08:08 +01:00
2015-07-27 11:08:41 +01:00
2015-08-12 11:28:23 +01:00
2015-01-15 11:55:07 +00:00
2015-04-01 11:12:03 +01:00
2015-07-27 11:08:40 +01:00
2015-07-27 16:37:14 +01:00
2015-07-02 17:44:27 +01:00
2015-03-30 11:03:43 +01:00
2015-10-06 19:10:28 +01:00
2014-12-09 13:12:47 -08:00
2015-07-27 11:08:41 +01:00
2015-10-01 12:51:28 +02:00
2015-07-10 16:47:13 +01:00
2014-07-31 11:42:42 +01:00
2015-10-02 11:12:56 +01:00
2015-08-21 15:11:43 +01:00
2015-08-27 09:55:26 +01:00
2015-02-23 09:13:45 +00:00
2015-09-15 15:50:01 +01:00
2015-09-17 11:57:02 +01:00
2014-07-08 22:11:47 +00:00
2014-07-10 12:36:40 +01:00
2015-10-05 18:30:29 +01:00
2014-11-06 17:25:27 +00:00
2015-07-27 11:08:40 +01:00
2015-08-03 11:34:12 +02:00
2015-07-27 11:08:42 +01:00
2014-07-10 11:02:40 +01:00
2015-08-24 13:44:08 +01:00
2015-09-17 11:57:03 +01:00
2015-07-30 20:17:07 +01:00
2015-07-27 11:08:39 +01:00
2015-07-27 11:08:40 +01:00
2015-01-09 11:12:28 +01:00
2015-06-11 15:35:23 +01:00
2015-02-26 18:23:53 +00:00
2015-08-05 14:14:06 +01:00
2015-07-27 11:08:39 +01:00
2014-09-08 14:39:19 +01:00
2015-10-06 18:33:15 +01:00
2015-09-17 11:57:03 +01:00
2015-04-13 20:40:10 +02:00
2015-08-05 10:05:20 +01:00
2015-05-19 16:09:29 +01:00
2015-07-29 18:32:09 +01:00
2014-09-08 14:39:19 +01:00
2015-06-19 14:46:39 +01:00
2015-03-19 10:43:51 +00:00
2014-12-01 13:31:12 +00:00
2015-01-27 09:38:08 +00:00
2015-07-27 11:08:40 +01:00
2015-07-27 11:08:41 +01:00
2014-11-20 16:35:02 +00:00
2015-07-27 11:08:42 +01:00
2015-08-10 15:37:45 +01:00
2015-06-02 17:44:51 +01:00