From 5a4031745f938b4950b58cda6678bc11c0a9ed85 Mon Sep 17 00:00:00 2001 From: Minchan Kim Date: Thu, 4 Jun 2020 11:47:14 +1000 Subject: [PATCH] mm: fix s390 compat build error Nathan reported build error with sys_compat_process_madvise. This patch should fix it. Link: http://lkml.kernel.org/r/20200429012421.GA132200@google.com Signed-off-by: Minchan Kim Reported-by: Nathan Chancellor Tested-by: Nathan Chancellor [build] Cc: Christian Brauner Signed-off-by: Andrew Morton Signed-off-by: Stephen Rothwell --- include/linux/compat.h | 5 +++-- mm/madvise.c | 9 ++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) 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;