qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [V2 PATCH 08/12] linux-user: Detect fault in sched_rr_get_i


From: Tom Musta
Subject: [Qemu-devel] [V2 PATCH 08/12] linux-user: Detect fault in sched_rr_get_interval
Date: Tue, 12 Aug 2014 13:53:39 -0500

Properly detect a fault when attempting to store into an invalid
struct timespec pointer.

Signed-off-by: Tom Musta <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
---
V2: Peter has observed that there are other call sites that may need to
be fixed.  I will address that in future patch(es).

 linux-user/syscall.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 49b8a07..a20c2f7 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -7760,7 +7760,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;
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]