[PATCH] mm: fix s390 compat build error

From: Minchan Kim
Date: Tue Apr 28 2020 - 21:20:24 EST


Nathan reported build error with sys_compat_process_madvise.
This patch should fix it.

Reported-by: Nathan Chancellor <natechancellor@xxxxxxxxx>
Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx>
---
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 1134ba3e61d0..19c524513cbb 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -820,9 +820,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 8fec261457a6..99c06d5f0785 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;
--
2.26.2.303.gf8c07b1a785-goog