diff --git a/include/linux/compat.h b/include/linux/compat.h index 8cf849da4f49ad..2e2f0a2700abf4 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -827,9 +827,10 @@ asmlinkage long compat_sys_pwritev64v2(unsigned long fd, unsigned long vlen, loff_t pos, rwf_t flags); #endif -asmlinkage ssize_t compat_sys_process_madvise(int which, +asmlinkage ssize_t compat_sys_process_madvise(compat_int_t which, compat_pid_t upid, const struct compat_iovec __user *vec, - unsigned long vlen, int behavior, unsigned long flags); + compat_ulong_t vlen, compat_int_t behavior, + compat_ulong_t flags); /* * Deprecated system calls which are still defined in diff --git a/mm/madvise.c b/mm/madvise.c index 520b4749058ede..89a620f8b79313 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -1311,9 +1311,12 @@ SYSCALL_DEFINE6(process_madvise, int, which, pid_t, upid, } #ifdef CONFIG_COMPAT -COMPAT_SYSCALL_DEFINE6(process_madvise, int, which, compat_pid_t, upid, - const struct compat_iovec __user *, vec, unsigned long, vlen, - int, behavior, unsigned long, flags) +COMPAT_SYSCALL_DEFINE6(process_madvise, compat_int_t, which, + compat_pid_t, upid, + const struct compat_iovec __user *, vec, + compat_ulong_t, vlen, + compat_int_t, behavior, + compat_ulong_t, flags) { ssize_t ret;