summaryrefslogtreecommitdiff
path: root/mm/kasan/report.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/kasan/report.c')
-rw-r--r--mm/kasan/report.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/kasan/report.c b/mm/kasan/report.c
index 83f420a28c0b..570f9419b90c 100644
--- a/mm/kasan/report.c
+++ b/mm/kasan/report.c
@@ -208,14 +208,14 @@ static void print_track(struct kasan_track *track, const char *prefix)
struct page *kasan_addr_to_page(const void *addr)
{
- if ((addr >= (void *)PAGE_OFFSET) && (addr < high_memory))
+ if (virt_addr_valid(addr))
return virt_to_head_page(addr);
return NULL;
}
struct slab *kasan_addr_to_slab(const void *addr)
{
- if ((addr >= (void *)PAGE_OFFSET) && (addr < high_memory))
+ if (virt_addr_valid(addr))
return virt_to_slab(addr);
return NULL;
}