linux/arch/arm64
Yang Shi abffa6f3b1 arm64: convert patch_lock to raw lock
When running kprobe test on arm64 rt kernel, it reports the below warning:

root@qemu7:~# modprobe kprobe_example
BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:917
in_atomic(): 0, irqs_disabled(): 128, pid: 484, name: modprobe
CPU: 0 PID: 484 Comm: modprobe Not tainted 4.1.6-rt5 #2
Hardware name: linux,dummy-virt (DT)
Call trace:
[<ffffffc0000891b8>] dump_backtrace+0x0/0x128
[<ffffffc000089300>] show_stack+0x20/0x30
[<ffffffc00061dae8>] dump_stack+0x1c/0x28
[<ffffffc0000bbad0>] ___might_sleep+0x120/0x198
[<ffffffc0006223e8>] rt_spin_lock+0x28/0x40
[<ffffffc000622b30>] __aarch64_insn_write+0x28/0x78
[<ffffffc000622e48>] aarch64_insn_patch_text_nosync+0x18/0x48
[<ffffffc000622ee8>] aarch64_insn_patch_text_cb+0x70/0xa0
[<ffffffc000622f40>] aarch64_insn_patch_text_sync+0x28/0x48
[<ffffffc0006236e0>] arch_arm_kprobe+0x38/0x48
[<ffffffc00010e6f4>] arm_kprobe+0x34/0x50
[<ffffffc000110374>] register_kprobe+0x4cc/0x5b8
[<ffffffbffc002038>] kprobe_init+0x38/0x7c [kprobe_example]
[<ffffffc000084240>] do_one_initcall+0x90/0x1b0
[<ffffffc00061c498>] do_init_module+0x6c/0x1cc
[<ffffffc0000fd0c0>] load_module+0x17f8/0x1db0
[<ffffffc0000fd8cc>] SyS_finit_module+0xb4/0xc8

Convert patch_lock to raw loc kto avoid this issue.

Although the problem is found on rt kernel, the fix should be applicable to
mainline kernel too.

Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Yang Shi <yang.shi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-10-05 18:30:29 +01:00
..
boot Documentation: arm: Fix typo in the idle-states bindings examples 2015-09-24 17:55:32 -05:00
configs arm64: Enable Marvell Berlin SoC family in defconfig 2015-08-06 10:15:57 +02:00
crypto crypto: aead - Remove CRYPTO_ALG_AEAD_NEW flag 2015-08-17 16:53:53 +08:00
include arm64: Fix THP protection change logic 2015-10-01 18:02:21 +01:00
kernel arm64: convert patch_lock to raw lock 2015-10-05 18:30:29 +01:00
kvm Second set of KVM/ARM changes for 4.3-rc2 2015-09-17 16:51:59 +02:00
lib arm64: atomics: prefetch the destination word for write prior to stxr 2015-07-27 15:28:53 +01:00
mm arm64: readahead: fault retry breaks mmap file read random detection 2015-10-05 16:30:50 +01:00
net arm64: bpf: fix endianness conversion bugs 2015-06-26 14:15:39 +01:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig arm64: errata: add module build workaround for erratum #843419 2015-09-17 11:57:03 +01:00
Kconfig.debug coresight: moving to new "hwtracing" directory 2015-04-03 16:17:04 +02:00
Kconfig.platforms arm64: Enable Marvell Berlin SoC family in Kconfig 2015-08-06 10:15:01 +02:00
Makefile arm64: errata: add module build workaround for erratum #843419 2015-09-17 11:57:03 +01:00