Skip to content

Commit 9b2d38b

Browse files
committed
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 <linus.walleij@linaro.org>
1 parent 44c026a commit 9b2d38b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/proc/kcore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ kclist_add_private(unsigned long pfn, unsigned long nr_pages, void *arg)
199199
ent->addr = (unsigned long)page_to_virt(p);
200200
ent->size = nr_pages << PAGE_SHIFT;
201201

202-
if (!virt_addr_valid(ent->addr))
202+
if (!virt_addr_valid((void *)ent->addr))
203203
goto free_out;
204204

205205
/* cut not-mapped area. ....from ppc-32 code. */

0 commit comments

Comments
 (0)