linux/arch/arm64
Will Deacon e04a28d45f arm64: debug: re-enable irqs before sending breakpoint SIGTRAP
force_sig_info can sleep under an -rt kernel, so attempting to send a
breakpoint SIGTRAP with interrupts disabled yields the following BUG:

  BUG: sleeping function called from invalid context at
  /kernel-source/kernel/locking/rtmutex.c:917
  in_atomic(): 0, irqs_disabled(): 128, pid: 551, name: test.sh
  CPU: 5 PID: 551 Comm: test.sh Not tainted 4.1.13-rt13 #7
  Hardware name: Freescale Layerscape 2085a RDB Board (DT)
  Call trace:
	 dump_backtrace+0x0/0x128
	 show_stack+0x24/0x30
	 dump_stack+0x80/0xa0
	 ___might_sleep+0x128/0x1a0
	 rt_spin_lock+0x2c/0x40
	 force_sig_info+0xcc/0x210
	 brk_handler.part.2+0x6c/0x80
	 brk_handler+0xd8/0xe8
	 do_debug_exception+0x58/0xb8

This patch fixes the problem by ensuring that interrupts are enabled
prior to sending the SIGTRAP if they were already enabled in the user
context.

Reported-by: Yang Shi <yang.shi@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-02-10 16:05:28 +00:00
..
boot ARM: SoC fixes for v4.5-rc 2016-02-07 15:23:20 -08:00
configs arm64: defconfig: updates for 4.5 2016-01-26 11:24:41 +00:00
crypto arm64: crypto: reduce priority of core AES cipher 2015-11-18 12:09:08 +00:00
include arm64: asm: Explicitly include linux/personality.h in asm/page.h 2016-02-03 19:22:02 +00:00
kernel arm64: debug: re-enable irqs before sending breakpoint SIGTRAP 2016-02-10 16:05:28 +00:00
kvm arm64: KVM: Add support for 16-bit VMID 2015-12-18 10:15:12 +00:00
lib arm64: add KASAN support 2015-10-12 17:46:36 +01:00
mm arm64: allow vmalloc regions to be set with set_memory_* 2016-02-02 15:42:15 +00:00
net arm64: bpf: add extra pass to handle faulty codegen 2016-01-17 19:15:26 -05:00
xen xen/arm: introduce HYPERVISOR_platform_op on arm and arm64 2015-12-21 14:40:56 +00:00
Kconfig dma-mapping: always provide the dma_map_ops based implementation 2016-01-20 17:09:18 -08:00
Kconfig.debug arch: consolidate CONFIG_STRICT_DEVM in lib/Kconfig.debug 2016-01-09 06:30:49 -08:00
Kconfig.platforms ARM: SoC support for Tegra platforms for v4.5 2016-01-22 17:30:52 -08:00
Makefile arm64: errata: Add -mpc-relative-literal-loads to build flags 2016-01-26 11:17:23 +00:00