summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm
diff options
context:
space:
mode:
authorWill Deacon <will@kernel.org>2020-02-19 13:19:13 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-28 19:22:18 +0300
commit98583fb54c2b12002c15b0171a5b9c75cb2e578c (patch)
treed174b3fcedcad920420208f5b6a442778b29869f /arch/arm64/include/asm
parent9b9374cf1ea7ff2a899ae6f7557a64458d3b23b3 (diff)
downloadlinux-98583fb54c2b12002c15b0171a5b9c75cb2e578c.tar.xz
arm64: memory: Add missing brackets to untagged_addr() macro
commit d0022c0ef29b78bcbe8a5c5894bd2307143afce1 upstream. Add brackets around the evaluation of the 'addr' parameter to the untagged_addr() macro so that the cast to 'u64' applies to the result of the expression. Cc: <stable@vger.kernel.org> Fixes: 597399d0cb91 ("arm64: tags: Preserve tags for addresses translated via TTBR1") Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Will Deacon <will@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm64/include/asm')
-rw-r--r--arch/arm64/include/asm/memory.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h
index c23c47360664..08df42e4db96 100644
--- a/arch/arm64/include/asm/memory.h
+++ b/arch/arm64/include/asm/memory.h
@@ -219,7 +219,7 @@ static inline unsigned long kaslr_offset(void)
((__force __typeof__(addr))sign_extend64((__force u64)(addr), 55))
#define untagged_addr(addr) ({ \
- u64 __addr = (__force u64)addr; \
+ u64 __addr = (__force u64)(addr); \
__addr &= __untagged_addr(__addr); \
(__force __typeof__(addr))__addr; \
})