From: Linus Walleij Date: Mon, 29 Aug 2022 13:08:04 +0000 (+0200) Subject: fs/proc/kcore.c: Pass a pointer to virt_addr_valid() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9b2d38b4e4a4651ac6efc8ca1a1882c0d4f12937;p=linux.git fs/proc/kcore.c: Pass a pointer to virt_addr_valid() The virt_addr_valid() should be passed a pointer, the current code passing a long unsigned int is just exploiting the unintentional polymorphism of these calls being implemented as preprocessor macros. Signed-off-by: Linus Walleij --- diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index 25b44b303b355..75708c66527f4 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c @@ -199,7 +199,7 @@ kclist_add_private(unsigned long pfn, unsigned long nr_pages, void *arg) ent->addr = (unsigned long)page_to_virt(p); ent->size = nr_pages << PAGE_SHIFT; - if (!virt_addr_valid(ent->addr)) + if (!virt_addr_valid((void *)ent->addr)) goto free_out; /* cut not-mapped area. ....from ppc-32 code. */