diff options
author | Felix Janda <felix.janda@posteo.de> | 2014-12-02 22:11:17 +0100 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2015-01-27 22:33:57 +0200 |
commit | 95018018caeea209f58695645fd1d50a9d0ba6df (patch) | |
tree | 0ac118f26004f7bc87042d94c3747f7af3fabdd1 /linux-user | |
parent | f6c7a05b8985df7eaf9942ca78e19890204eee4a (diff) | |
download | qemu-95018018caeea209f58695645fd1d50a9d0ba6df.zip |
linux-user: translate resource also for prlimit64
The resource argument is translated from host to target for
[gs]etprlimit but not for prlimit64. Fix this.
Signed-off-by: Felix Janda <felix.janda@posteo.de>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/syscall.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index aaac6a25ce..5658b66499 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -9529,6 +9529,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, /* args: pid, resource number, ptr to new rlimit, ptr to old rlimit */ struct target_rlimit64 *target_rnew, *target_rold; struct host_rlimit64 rnew, rold, *rnewp = 0; + int resource = target_to_host_resource(arg2); if (arg3) { if (!lock_user_struct(VERIFY_READ, target_rnew, arg3, 1)) { goto efault; @@ -9539,7 +9540,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, rnewp = &rnew; } - ret = get_errno(sys_prlimit64(arg1, arg2, rnewp, arg4 ? &rold : 0)); + ret = get_errno(sys_prlimit64(arg1, resource, rnewp, arg4 ? &rold : 0)); if (!is_error(ret) && arg4) { if (!lock_user_struct(VERIFY_WRITE, target_rold, arg4, 1)) { goto efault; |