linux-stable/arch/powerpc
Li Zhong 1e858f50ca powerpc: Fix unpaired probe_hcall_entry and probe_hcall_exit
commit e4f387d8db upstream.

Unpaired calling of probe_hcall_entry and probe_hcall_exit might happen
as following, which could cause incorrect preempt count.

__trace_hcall_entry => trace_hcall_entry -> probe_hcall_entry =>
get_cpu_var => preempt_disable

__trace_hcall_exit => trace_hcall_exit -> probe_hcall_exit =>
put_cpu_var => preempt_enable

where:
A => B and A -> B means A calls B, but
=> means A will call B through function name, and B will definitely be
called.
-> means A will call B through function pointer, so B might not be
called if the function pointer is not set.

So error happens when only one of probe_hcall_entry and probe_hcall_exit
get called during a hcall.

This patch tries to move the preempt count operations from
probe_hcall_entry and probe_hcall_exit to its callers.

Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-12 11:33:14 -08:00
..
boot powerpc/p1023rds: Fix the error of bank-width of nor flash 2011-08-30 21:27:33 -05:00
configs powerpc/85xx: enable caam crypto driver by default 2011-08-30 21:27:30 -05:00
include/asm powerpc/time: Handle wrapping of decrementer 2012-01-12 11:33:13 -08:00
kernel powerpc/time: Handle wrapping of decrementer 2012-01-12 11:33:13 -08:00
kvm powerpc: Add hvcall.h include to book3s_hv.c 2011-11-21 14:35:27 -08:00
lib powerpc: Copy down exception vectors after feature fixups 2011-11-21 14:35:28 -08:00
math-emu powerpc/85xx: Fix SPE float to integer conversion failure 2011-03-15 13:48:15 -05:00
mm powerpc: Fix deadlock in icswx code 2011-11-11 09:44:42 -08:00
net net: filter: BPF 'JIT' compiler for PPC64 2011-07-21 12:38:32 -07:00
oprofile powerpc/oprofile: Handle events that raise an exception without overflowing 2011-05-26 13:38:57 +10:00
platforms powerpc: Fix unpaired probe_hcall_entry and probe_hcall_exit 2012-01-12 11:33:14 -08:00
sysdev arch/powerpc/sysdev/fsl_rio.c: correct IECSR register clear value 2011-08-25 18:51:06 -07:00
xmon powerpc: Remove call sites of MSG_ALL_BUT_SELF 2011-05-19 14:30:46 +10:00
Kconfig Merge branch 'apei' into apei-release 2011-08-03 11:30:42 -04:00
Kconfig.debug powerpc/pseries: Re-implement HVSI as part of hvc_vio 2011-06-29 17:48:35 +10:00
Makefile Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2011-07-25 22:59:39 -07:00
relocs_check.pl powerpc: Check for unsupported relocs when using CONFIG_RELOCATABLE 2009-09-24 15:31:40 +10:00