* [Qemu-devel] [PATCH] linux-user: translate resource also for prlimit64
@ 2014-12-02 21:11 Felix Janda
2014-12-11 21:05 ` [Qemu-devel] " Felix Janda
0 siblings, 1 reply; 2+ messages in thread
From: Felix Janda @ 2014-12-02 21:11 UTC (permalink / raw)
To: qemu-devel
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>
---
linux-user/syscall.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index aaac6a2..5658b66 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;
--
2.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] linux-user: translate resource also for prlimit64
2014-12-02 21:11 [Qemu-devel] [PATCH] linux-user: translate resource also for prlimit64 Felix Janda
@ 2014-12-11 21:05 ` Felix Janda
0 siblings, 0 replies; 2+ messages in thread
From: Felix Janda @ 2014-12-11 21:05 UTC (permalink / raw)
To: qemu-devel; +Cc: Riku Voipio
ping (forgot to CC to maintainer before)
http://patchwork.ozlabs.org/patch/417154/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-11 21:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-02 21:11 [Qemu-devel] [PATCH] linux-user: translate resource also for prlimit64 Felix Janda
2014-12-11 21:05 ` [Qemu-devel] " Felix Janda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).