summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinchan Kim <minchan@kernel.org>2020-05-30 14:51:08 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2020-06-02 19:15:35 +1000
commit2ab8faf0ae1a7b5e59110c9c2f828e55e587a739 (patch)
tree6170059807a2c50246475e031e72e54f7d47391b
parente1fb7dc27f77297ebd5d4bf77da5d21f3f9cf22e (diff)
downloadlinux-2ab8faf0ae1a7b5e59110c9c2f828e55e587a739.tar.gz
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 <minchan@kernel.org> Reported-by: Nathan Chancellor <natechancellor@gmail.com> Tested-by: Nathan Chancellor <natechancellor@gmail.com> [build] Cc: Christian Brauner <christian.brauner@ubuntu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
-rw-r--r--include/linux/compat.h5
-rw-r--r--mm/madvise.c9
2 files changed, 9 insertions, 5 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 8cf849da4f49..2e2f0a2700ab 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 520b4749058e..89a620f8b793 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;