[Qemu-devel] [PATCH] linux-user/syscall.c : Minor cleanups of timer_create handling.

2014-08-02 Thread Erik de Castro Lopo
* Add missing unlock of user struct. * Remove unneeded pointer variable. Signed-off-by: Erik de Castro Lopo er...@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

Re: [Qemu-devel] [PATCH] linux-user/syscall.c : Minor cleanups of timer_create handling.

2014-08-02 Thread Peter Maydell
On 2 August 2014 15:10, Erik de Castro Lopo er...@mega-nerd.com wrote: * Add missing unlock of user struct. * Remove unneeded pointer variable. Signed-off-by: Erik de Castro Lopo er...@mega-nerd.com --- linux-user/syscall.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

Re: [Qemu-devel] [PATCH] linux-user/syscall.c : Minor cleanups of timer_create handling.

2014-08-02 Thread Erik de Castro Lopo
Peter Maydell wrote: Doesn't this turn a timer_create(clkid, NULL, phtimer) into a timer_create(clkid, something-not-NULL, phtimer) ? That doesn't seem right to me (and the code you've deleted here is the common idiom in syscall.c for handling those arg is pointer-to-struct-or-NULL cases).

Re: [Qemu-devel] [PATCH] linux-user/syscall.c : Minor cleanups of timer_create handling.

2014-08-02 Thread Peter Maydell
On 2 August 2014 23:48, Erik de Castro Lopo mle+to...@mega-nerd.com wrote: Peter Maydell wrote: Doesn't this turn a timer_create(clkid, NULL, phtimer) into a timer_create(clkid, something-not-NULL, phtimer) ? That doesn't seem right to me (and the code you've deleted here is the common idiom

Re: [Qemu-devel] [PATCH] linux-user/syscall.c : Minor cleanups of timer_create handling.

2014-08-02 Thread Erik de Castro Lopo
Peter Maydell wrote: Amend it to what? The current code looks fine to me, so I'm not sure what bug you're trying to fix here. There is still a missing call to unlock_user_struct() inside the if (arg2) block. Is that not worth fixing? Erik --

Re: [Qemu-devel] [PATCH] linux-user/syscall.c : Minor cleanups of timer_create handling.

2014-08-02 Thread Peter Maydell
On 3 August 2014 00:21, Erik de Castro Lopo mle+to...@mega-nerd.com wrote: Peter Maydell wrote: Amend it to what? The current code looks fine to me, so I'm not sure what bug you're trying to fix here. There is still a missing call to unlock_user_struct() inside the if (arg2) block. Is that