Skip to content

Commit

Permalink
mm: fix s390 compat build error
Browse files Browse the repository at this point in the history
Nathan reported build error with sys_compat_process_madvise.
This patch should fix it.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Minchan Kim <[email protected]>
Reported-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>	[build]
Cc: Christian Brauner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Stephen Rothwell <[email protected]>
  • Loading branch information
minchank authored and sfrothwell committed Jun 5, 2020
1 parent 1cc8035 commit 5a40317
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 3 additions & 2 deletions include/linux/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions mm/madvise.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5a40317

Please sign in to comment.