aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Musta <tommusta@gmail.com>2014-08-12 13:53:39 -0500
committerRiku Voipio <riku.voipio@linaro.org>2014-08-22 15:06:35 +0300
commitd4290c40a4bf297e9af132be81d51bf796882ff2 (patch)
tree1a510ce8de4114af6d45b3c54374717ec81810ae
parenta1d5c5b25d06b68aec76e4b0eb7d8aacb5fbd191 (diff)
linux-user: Detect fault in sched_rr_get_interval
Properly detect a fault when attempting to store into an invalid struct timespec pointer. Signed-off-by: Tom Musta <tommusta@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
-rw-r--r--linux-user/syscall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 4424b63c86..ed32f9723f 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -7794,7 +7794,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
struct timespec ts;
ret = get_errno(sched_rr_get_interval(arg1, &ts));
if (!is_error(ret)) {
- host_to_target_timespec(arg2, &ts);
+ ret = host_to_target_timespec(arg2, &ts);
}
}
break;