From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDae6-0006Yq-Sj for qemu-devel@nongnu.org; Sat, 02 Aug 2014 10:50:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XDae0-0003NK-G3 for qemu-devel@nongnu.org; Sat, 02 Aug 2014 10:50:54 -0400 Received: from hendrix.mega-nerd.net ([203.206.230.162]:35918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDae0-0003MD-12 for qemu-devel@nongnu.org; Sat, 02 Aug 2014 10:50:48 -0400 From: Erik de Castro Lopo Date: Sun, 3 Aug 2014 00:10:33 +1000 Message-Id: <1406988633-29469-1-git-send-email-erikd@mega-nerd.com> Subject: [Qemu-devel] [PATCH] linux-user/syscall.c : Minor cleanups of timer_create handling. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Riku Voipio , Erik de Castro Lopo * Add missing unlock of user struct. * Remove unneeded pointer variable. Signed-off-by: Erik de Castro Lopo --- 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