linux-user: change do_semop to return target errno when unsuccessful
PATCH 1/1 linux-user: change do_semop to return target errno when unsuccessful
From: Petar Jovanovic <[email protected]>
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.
--- linux-user/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
linux-user/syscall.c +2 -2
@@ -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_semopcase TARGET_NR_semop: - ret =get_errno (do_semop (arg1, arg2, arg3)); + ret =do_semop (arg1, arg2, arg3);break ;#endif #ifdef TARGET_NR_semctl
Signature · 1 line
1.7.9.5
Quoted 7 lines · Petar Jovanovic
From: Petar Jovanovic <[email protected]>
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 <[email protected]>
-- PMM
Petar Jovanovic
Reviewed-by Peter Maydellping
http://patchwork.ozlabs.org/patch/229787/
________________________________________
From: Peter Maydell [[email protected]]
Sent: Thursday, March 21, 2013 7:03 PM
To: Petar Jovanovic
Cc: [email protected]; [email protected]; Petar Jovanovic
Subject: Re: [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful
Quoted 7 lines · Petar Jovanovic
From: Petar Jovanovic <[email protected]>
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 <[email protected]>
-- PMM
Petar Jovanovic
Reviewed-by Peter Maydellping
________________________________________
From: Petar Jovanovic
Sent: Monday, April 01, 2013 7:07 PM
To: Peter Maydell; Petar Jovanovic
Cc: [email protected]; [email protected]
Subject: RE: [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful
ping
http://patchwork.ozlabs.org/patch/229787/
________________________________________
From: Peter Maydell [[email protected]]
Sent: Thursday, March 21, 2013 7:03 PM
To: Petar Jovanovic
Cc: [email protected]; [email protected]; Petar Jovanovic
Subject: Re: [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful
Quoted 7 lines · Petar Jovanovic
From: Petar Jovanovic <[email protected]>
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 <[email protected]>
-- PMM
Petar Jovanovic
Reviewed-by Peter Maydellping
________________________________________
From: Petar Jovanovic
Sent: Monday, April 08, 2013 8:31 PM
To: Peter Maydell; Petar Jovanovic
Cc: [email protected]; [email protected]
Subject: RE: [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful
ping
________________________________________
From: Petar Jovanovic
Sent: Monday, April 01, 2013 7:07 PM
To: Peter Maydell; Petar Jovanovic
Cc: [email protected]; [email protected]
Subject: RE: [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful
ping
http://patchwork.ozlabs.org/patch/229787/
________________________________________
From: Peter Maydell [[email protected]]
Sent: Thursday, March 21, 2013 7:03 PM
To: Petar Jovanovic
Cc: [email protected]; [email protected]; Petar Jovanovic
Subject: Re: [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful
Quoted 7 lines · Petar Jovanovic
From: Petar Jovanovic <[email protected]>
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 <[email protected]>
-- PMM
Stefan Hajnoczi
AppliedQuoted 10 lines · Petar Jovanovic
From: Petar Jovanovic <[email protected]>
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 <[email protected]>--- 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
Quoted 12 lines · Stefan Hajnoczi
Quoted 10 lines · Petar Jovanovic
From: Petar Jovanovic <[email protected]>
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 <[email protected]>--- linux-user/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 4 lines
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patchesHi,
It's also in my linux-user updates set I'm testing now: