aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2014-08-29 11:08:02 -0400
committerWill Deacon <will.deacon@arm.com>2014-08-29 11:11:00 -0400
commit2520d039728b2a3c5ae7f79fe2a0e9d182855b12 (patch)
tree0a0d092f82171f9a4749334c2f1c5c804b425401
parent5b75a6af11357813a7eeb4a29d0261adbbfab556 (diff)
arm64: Add brackets around user_stack_pointer()
Commit 5f888a1d33 (ARM64: perf: support dwarf unwinding in compat mode) changes user_stack_pointer() to return the compat SP for 32-bit tasks but without brackets around the whole definition, with possible issues on the call sites (noticed with a subsequent fix for KSTK_ESP). Fixes: 5f888a1d33c4 (ARM64: perf: support dwarf unwinding in compat mode) Reported-by: Sudeep Holla <sudeep.holla@arm.com> Cc: <stable@vger.kernel.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--arch/arm64/include/asm/ptrace.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h
index 501000fadb6f..41ed9e13795e 100644
--- a/arch/arm64/include/asm/ptrace.h
+++ b/arch/arm64/include/asm/ptrace.h
@@ -137,7 +137,7 @@ struct pt_regs {
137 (!((regs)->pstate & PSR_F_BIT)) 137 (!((regs)->pstate & PSR_F_BIT))
138 138
139#define user_stack_pointer(regs) \ 139#define user_stack_pointer(regs) \
140 (!compat_user_mode(regs)) ? ((regs)->sp) : ((regs)->compat_sp) 140 (!compat_user_mode(regs) ? (regs)->sp : (regs)->compat_sp)
141 141
142static inline unsigned long regs_return_value(struct pt_regs *regs) 142static inline unsigned long regs_return_value(struct pt_regs *regs)
143{ 143{