alistair23-linux/arch/arm64
William Cohen 899d5933b2 Correct the race condition in aarch64_insn_patch_text_sync()
When experimenting with patches to provide kprobes support for aarch64
smp machines would hang when inserting breakpoints into kernel code.
The hangs were caused by a race condition in the code called by
aarch64_insn_patch_text_sync().  The first processor in the
aarch64_insn_patch_text_cb() function would patch the code while other
processors were still entering the function and incrementing the
cpu_count field.  This resulted in some processors never observing the
exit condition and exiting the function.  Thus, processors in the
system hung.

The first processor to enter the patching function performs the
patching and signals that the patching is complete with an increment
of the cpu_count field. When all the processors have incremented the
cpu_count field the cpu_count will be num_cpus_online()+1 and they
will return to normal execution.

Fixes: ae16480785 arm64: introduce interfaces to hotpatch kernel and module code
Signed-off-by: William Cohen <wcohen@redhat.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2014-11-13 15:21:39 +00:00
..
boot arm64: vexpress: Add CLCD support to the ARMv8 model platform 2014-10-22 15:33:16 +01:00
configs arm64: defconfig: update defconfig for 3.18 2014-11-05 17:07:58 +00:00
crypto arm64/crypto: remove redundant update of data 2014-08-26 11:42:22 +01:00
include arm64: compat: Enable bpf syscall 2014-11-05 16:26:35 +00:00
kernel Correct the race condition in aarch64_insn_patch_text_sync() 2014-11-13 15:21:39 +00:00
kvm Second batch of changes for KVM/{arm,arm64} for 3.18 2014-10-18 14:32:31 -07:00
lib arm64: __clear_user: handle exceptions on strb 2014-11-13 15:21:26 +00:00
mm arm64: Fix data type for physical address 2014-11-13 14:58:45 +00:00
net net: bpf: arm64: minor fix of type in jited 2014-10-20 17:47:04 +01:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig arm64: ASLR: Don't randomise text when randomise_va_space == 0 2014-10-24 15:47:49 +01:00
Kconfig.debug arm64: Add CONFIG_DEBUG_SET_MODULE_RONX support 2014-09-08 14:39:18 +01:00
Makefile Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2014-10-14 09:22:26 +02:00