Message ID | 1363888656-123910-1-git-send-email-petar.jovanovic@rt-rk.com |
---|---|
State | New |
Headers | show |
On 21 March 2013 17:57, Petar Jovanovic <petar.jovanovic@rt-rk.com> wrote: > From: Petar Jovanovic <petar.jovanovic@imgtec.com> > > do_semop() is called from two places, and one of these fails to convert > return error to target errno when semop fails. This patch changes the > function to always return target errno in case of an unsuccessful call. > > Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> -- PMM
ping http://patchwork.ozlabs.org/patch/229787/
ping
+ qemu-trivial@nongnu.org ping
On Thu, Mar 21, 2013 at 06:57:36PM +0100, Petar Jovanovic wrote: > From: Petar Jovanovic <petar.jovanovic@imgtec.com> > > do_semop() is called from two places, and one of these fails to convert > return error to target errno when semop fails. This patch changes the > function to always return target errno in case of an unsuccessful call. > > Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com> > --- > linux-user/syscall.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Thanks, applied to the trivial patches tree: https://github.com/stefanha/qemu/commits/trivial-patches Stefan
On 19 April 2013 12:42, Stefan Hajnoczi <stefanha@gmail.com> wrote: > On Thu, Mar 21, 2013 at 06:57:36PM +0100, Petar Jovanovic wrote: > > From: Petar Jovanovic <petar.jovanovic@imgtec.com> > > > > do_semop() is called from two places, and one of these fails to convert > > return error to target errno when semop fails. This patch changes the > > function to always return target errno in case of an unsuccessful call. > > > > Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com> > > --- > > linux-user/syscall.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > Thanks, applied to the trivial patches tree: > https://github.com/stefanha/qemu/commits/trivial-patches > > Hi, It's also in my linux-user updates set I'm testing now: https://git.linaro.org/gitweb?p=people/rikuvoipio/qemu.git;a=shortlog;h=refs/heads/linux-user-for-upstream
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index ee82a2d..3c4c155 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2764,7 +2764,7 @@ static inline abi_long do_semop(int semid, abi_long ptr, unsigned nsops) if (target_to_host_sembuf(sops, ptr, nsops)) return -TARGET_EFAULT; - return semop(semid, sops, nsops); + return get_errno(semop(semid, sops, nsops)); } struct target_msqid_ds @@ -6957,7 +6957,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, #endif #ifdef TARGET_NR_semop case TARGET_NR_semop: - ret = get_errno(do_semop(arg1, arg2, arg3)); + ret = do_semop(arg1, arg2, arg3); break; #endif #ifdef TARGET_NR_semctl