]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
fs/proc/kcore.c: Pass a pointer to virt_addr_valid()
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 29 Aug 2022 13:08:04 +0000 (15:08 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 29 May 2023 09:27:07 +0000 (11:27 +0200)
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 <linus.walleij@linaro.org>
fs/proc/kcore.c

index 25b44b303b355606ee417521deb4c63878dd0cfb..75708c66527f48252d1ff6ec5b1cc0d2cd219145 100644 (file)
@@ -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. */