]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Fix unpaired __trace_hcall_entry and __trace_hcall_exit
authorLi Zhong <zhong@linux.vnet.ibm.com>
Sat, 7 Jan 2012 17:54:52 +0000 (17:54 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 11 Jan 2012 01:50:26 +0000 (12:50 +1100)
commitb35eddba42a06da40d48b400323542fab99c892d
tree8912e1ebd7d665286e7bc28ec30688517835da87
parentf3bd1076ce71d75aaf1f98a781a913f5da5bfd27
powerpc: Fix unpaired __trace_hcall_entry and __trace_hcall_exit

 Unpaired calling of __trace_hcall_entry and __trace_hcall_exit could
 cause incorrect preempt count. And it might happen as the global
 variable hcall_tracepoint_refcount is checked separately before calling
 them.

 Instead, store the value that was used on entry in the stack frame
 and retreive it from there after the call

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>
arch/powerpc/platforms/pseries/hvCall.S