Skip to content

Commit d0022c0

Browse files
committed
arm64: memory: Add missing brackets to untagged_addr() macro
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: <[email protected]> Fixes: 597399d ("arm64: tags: Preserve tags for addresses translated via TTBR1") Reported-by: Linus Torvalds <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent dd1f630 commit d0022c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/include/asm/memory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ static inline unsigned long kaslr_offset(void)
213213
((__force __typeof__(addr))sign_extend64((__force u64)(addr), 55))
214214

215215
#define untagged_addr(addr) ({ \
216-
u64 __addr = (__force u64)addr; \
216+
u64 __addr = (__force u64)(addr); \
217217
__addr &= __untagged_addr(__addr); \
218218
(__force __typeof__(addr))__addr; \
219219
})

0 commit comments

Comments
 (0)