summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mm/kasan/kasan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/kasan/kasan.c b/mm/kasan/kasan.c
index 21c50dcbc9f0..2b21ccd55cd4 100644
--- a/mm/kasan/kasan.c
+++ b/mm/kasan/kasan.c
@@ -203,7 +203,7 @@ static __always_inline bool memory_is_poisoned_n(unsigned long addr,
s8 *last_shadow = (s8 *)kasan_mem_to_shadow((void *)last_byte);
if (unlikely(ret != (unsigned long)last_shadow ||
- ((last_byte & KASAN_SHADOW_MASK) >= *last_shadow)))
+ ((long)(last_byte & KASAN_SHADOW_MASK) >= *last_shadow)))
return true;
}
return false;