All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful
@ 2013-03-21 17:57 Petar Jovanovic
  2013-03-21 18:03 ` Peter Maydell
  2013-04-19  9:42 ` Stefan Hajnoczi
  0 siblings, 2 replies; 7+ messages in thread
From: Petar Jovanovic @ 2013-03-21 17:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: riku.voipio, petar.jovanovic

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

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
-- 
1.7.9.5

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

* Re: [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful
  2013-03-21 17:57 [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful Petar Jovanovic
@ 2013-03-21 18:03 ` Peter Maydell
  2013-04-01 17:07   ` Petar Jovanovic
  2013-04-19  9:42 ` Stefan Hajnoczi
  1 sibling, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2013-03-21 18:03 UTC (permalink / raw)
  To: Petar Jovanovic; +Cc: riku.voipio, qemu-devel, petar.jovanovic

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

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

* Re: [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful
  2013-03-21 18:03 ` Peter Maydell
@ 2013-04-01 17:07   ` Petar Jovanovic
  2013-04-08 18:31     ` Petar Jovanovic
  0 siblings, 1 reply; 7+ messages in thread
From: Petar Jovanovic @ 2013-04-01 17:07 UTC (permalink / raw)
  To: Peter Maydell, Petar Jovanovic; +Cc: riku.voipio, qemu-devel

ping

http://patchwork.ozlabs.org/patch/229787/

________________________________________
From: Peter Maydell [peter.maydell@linaro.org]
Sent: Thursday, March 21, 2013 7:03 PM
To: Petar Jovanovic
Cc: qemu-devel@nongnu.org; riku.voipio@linaro.org; Petar Jovanovic
Subject: Re: [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful

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

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

* Re: [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful
  2013-04-01 17:07   ` Petar Jovanovic
@ 2013-04-08 18:31     ` Petar Jovanovic
  2013-04-15 12:10       ` Petar Jovanovic
  0 siblings, 1 reply; 7+ messages in thread
From: Petar Jovanovic @ 2013-04-08 18:31 UTC (permalink / raw)
  To: Peter Maydell, Petar Jovanovic; +Cc: riku.voipio, qemu-devel

ping
________________________________________
From: Petar Jovanovic
Sent: Monday, April 01, 2013 7:07 PM
To: Peter Maydell; Petar Jovanovic
Cc: qemu-devel@nongnu.org; riku.voipio@linaro.org
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 [peter.maydell@linaro.org]
Sent: Thursday, March 21, 2013 7:03 PM
To: Petar Jovanovic
Cc: qemu-devel@nongnu.org; riku.voipio@linaro.org; Petar Jovanovic
Subject: Re: [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful

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

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

* Re: [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful
  2013-04-08 18:31     ` Petar Jovanovic
@ 2013-04-15 12:10       ` Petar Jovanovic
  0 siblings, 0 replies; 7+ messages in thread
From: Petar Jovanovic @ 2013-04-15 12:10 UTC (permalink / raw)
  To: Peter Maydell, Petar Jovanovic; +Cc: qemu-trivial, riku.voipio, qemu-devel

+ qemu-trivial@nongnu.org

ping
________________________________________
From: Petar Jovanovic
Sent: Monday, April 08, 2013 8:31 PM
To: Peter Maydell; Petar Jovanovic
Cc: qemu-devel@nongnu.org; riku.voipio@linaro.org
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: qemu-devel@nongnu.org; riku.voipio@linaro.org
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 [peter.maydell@linaro.org]
Sent: Thursday, March 21, 2013 7:03 PM
To: Petar Jovanovic
Cc: qemu-devel@nongnu.org; riku.voipio@linaro.org; Petar Jovanovic
Subject: Re: [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful

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

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

* Re: [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful
  2013-03-21 17:57 [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful Petar Jovanovic
  2013-03-21 18:03 ` Peter Maydell
@ 2013-04-19  9:42 ` Stefan Hajnoczi
  2013-04-19 10:10   ` Riku Voipio
  1 sibling, 1 reply; 7+ messages in thread
From: Stefan Hajnoczi @ 2013-04-19  9:42 UTC (permalink / raw)
  To: Petar Jovanovic; +Cc: riku.voipio, qemu-devel, petar.jovanovic

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

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

* Re: [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful
  2013-04-19  9:42 ` Stefan Hajnoczi
@ 2013-04-19 10:10   ` Riku Voipio
  0 siblings, 0 replies; 7+ messages in thread
From: Riku Voipio @ 2013-04-19 10:10 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: petar.jovanovic, Petar Jovanovic, qemu-devel qemu-devel

[-- Attachment #1: Type: text/plain, Size: 869 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1698 bytes --]

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

end of thread, other threads:[~2013-04-19 10:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-21 17:57 [Qemu-devel] [PATCH] linux-user: change do_semop to return target errno when unsuccessful Petar Jovanovic
2013-03-21 18:03 ` Peter Maydell
2013-04-01 17:07   ` Petar Jovanovic
2013-04-08 18:31     ` Petar Jovanovic
2013-04-15 12:10       ` Petar Jovanovic
2013-04-19  9:42 ` Stefan Hajnoczi
2013-04-19 10:10   ` Riku Voipio

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.