diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2014-09-09 16:49:28 +0200 | 
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2014-09-09 16:49:28 +0200 | 
| commit | 87e9d8fd26c782623b79f2968431179f29b339f2 (patch) | |
| tree | 45e2cf70f4609ee82859d28dd8a34effc750a6c5 /kernel/kprobes.c | |
| parent | facdb3dd378e81b8516a8faa061e0be56d2ae7be (diff) | |
| parent | 75a41826e2c5dc1dc0fd5195fc29b031c97337af (diff) | |
Merge tag 'socfpga_update_for_v3.18' of git://git.rocketboards.org/linux-socfpga-next into next/dt
Pull "arm: dts: Add Altera SDRAM EDAC bindings & devicetree entries" From Dinh Nguyen:
5 of the 6 patches are DTS updates and the 1 patch is updating
the MAINTAINERS entry with my new email address.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* tag 'socfpga_update_for_v3.18' of git://git.rocketboards.org/linux-socfpga-next:
  arm: dts: Add Altera SDRAM EDAC bindings & devicetree entries.
  ARM: dts: socfpga: memreserve first 4KB for future system use
  ARM: dts: socfpga: Add SD card detect
  ARM: dts: socfpga: remove extra alias in the ArriaV devkit
  ARM: dts: socfpga: unuse the slot-node and deprecate the supports-highspeed for dw-mmc
  MAINTAINERS: update entries for ARM/SOCFPGA platform
Diffstat (limited to 'kernel/kprobes.c')
| -rw-r--r-- | kernel/kprobes.c | 13 | 
1 files changed, 12 insertions, 1 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 734e9a7d280b..3995f546d0f3 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -1778,7 +1778,18 @@ static int pre_handler_kretprobe(struct kprobe *p, struct pt_regs *regs)  	unsigned long hash, flags = 0;  	struct kretprobe_instance *ri; -	/*TODO: consider to only swap the RA after the last pre_handler fired */ +	/* +	 * To avoid deadlocks, prohibit return probing in NMI contexts, +	 * just skip the probe and increase the (inexact) 'nmissed' +	 * statistical counter, so that the user is informed that +	 * something happened: +	 */ +	if (unlikely(in_nmi())) { +		rp->nmissed++; +		return 0; +	} + +	/* TODO: consider to only swap the RA after the last pre_handler fired */  	hash = hash_ptr(current, KPROBE_HASH_BITS);  	raw_spin_lock_irqsave(&rp->lock, flags);  	if (!hlist_empty(&rp->free_instances)) {  | 
