qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] linux-user/syscall.c : Minor cleanups of timer_create handling.
@ 2014-08-02 14:10 Erik de Castro Lopo
  2014-08-02 15:05 ` Peter Maydell
  2014-08-02 23:45 ` [Qemu-devel] [PATCH] linux-user: Add missing unlock_user_struct to timer_create Erik de Castro Lopo
  0 siblings, 2 replies; 9+ messages in thread
From: Erik de Castro Lopo @ 2014-08-02 14:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Riku Voipio, Erik de Castro Lopo

* Add missing unlock of user struct.
* Remove unneeded pointer variable.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
---
 linux-user/syscall.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index a50229d..7d8f54a 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -9412,7 +9412,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
     {
         /* args: clockid_t clockid, struct sigevent *sevp, timer_t *timerid */
 
-        struct sigevent host_sevp = { {0}, }, *phost_sevp = NULL;
+        struct sigevent host_sevp = { {0}, };
         struct target_sigevent *ptarget_sevp;
         struct target_timer_t *ptarget_timer;
 
@@ -9432,10 +9432,10 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
                 host_sevp.sigev_signo = tswap32(ptarget_sevp->sigev_signo);
                 host_sevp.sigev_notify = tswap32(ptarget_sevp->sigev_notify);
 
-                phost_sevp = &host_sevp;
+                unlock_user_struct(ptarget_sevp, arg2, 0);
             }
 
-            ret = get_errno(timer_create(clkid, phost_sevp, phtimer));
+            ret = get_errno(timer_create(clkid, &host_sevp, phtimer));
             if (ret) {
                 phtimer = NULL;
             } else {
-- 
2.0.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-08-06  7:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-02 14:10 [Qemu-devel] [PATCH] linux-user/syscall.c : Minor cleanups of timer_create handling Erik de Castro Lopo
2014-08-02 15:05 ` Peter Maydell
2014-08-02 22:48   ` Erik de Castro Lopo
2014-08-02 22:50     ` Peter Maydell
2014-08-02 23:21       ` Erik de Castro Lopo
2014-08-02 23:30         ` Peter Maydell
2014-08-02 23:45 ` [Qemu-devel] [PATCH] linux-user: Add missing unlock_user_struct to timer_create Erik de Castro Lopo
2014-08-03 13:09   ` Peter Maydell
2014-08-06  7:47   ` Riku Voipio

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).