* [Qemu-devel] [PATCH v2] linux-user/syscall.c: Need call unlock_user() before go to failure return in default case
@ 2015-01-25 0:00 Chen Gang S
2015-01-25 12:38 ` Peter Maydell
2015-01-27 17:24 ` Michael Tokarev
0 siblings, 2 replies; 3+ messages in thread
From: Chen Gang S @ 2015-01-25 0:00 UTC (permalink / raw)
To: Peter Maydell, Riku Voipio; +Cc: QEMU Trivial, qemu-devel
In abi_long do_ioctl_dm(), after calls lock_user(), it does not call
unlock_user() before go to failure return in default case.
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
linux-user/syscall.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index a427f7a..ec9e4fc 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3566,6 +3566,7 @@ static abi_long do_ioctl_dm(const IOCTLEntry *ie, uint8_t *buf_temp, int fd,
}
default:
ret = -TARGET_EINVAL;
+ unlock_user(argptr, guest_data, 0);
goto out;
}
unlock_user(argptr, guest_data, 0);
@@ -3685,6 +3686,7 @@ static abi_long do_ioctl_dm(const IOCTLEntry *ie, uint8_t *buf_temp, int fd,
break;
}
default:
+ unlock_user(argptr, guest_data, 0);
ret = -TARGET_EINVAL;
goto out;
}
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] linux-user/syscall.c: Need call unlock_user() before go to failure return in default case
2015-01-25 0:00 [Qemu-devel] [PATCH v2] linux-user/syscall.c: Need call unlock_user() before go to failure return in default case Chen Gang S
@ 2015-01-25 12:38 ` Peter Maydell
2015-01-27 17:24 ` Michael Tokarev
1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2015-01-25 12:38 UTC (permalink / raw)
To: Chen Gang S; +Cc: QEMU Trivial, Riku Voipio, qemu-devel
On 25 January 2015 at 00:00, Chen Gang S <gang.chen@sunrus.com.cn> wrote:
> In abi_long do_ioctl_dm(), after calls lock_user(), it does not call
> unlock_user() before go to failure return in default case.
>
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
> linux-user/syscall.c | 2 ++
> 1 file changed, 2 insertions(+)
--
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] linux-user/syscall.c: Need call unlock_user() before go to failure return in default case
2015-01-25 0:00 [Qemu-devel] [PATCH v2] linux-user/syscall.c: Need call unlock_user() before go to failure return in default case Chen Gang S
2015-01-25 12:38 ` Peter Maydell
@ 2015-01-27 17:24 ` Michael Tokarev
1 sibling, 0 replies; 3+ messages in thread
From: Michael Tokarev @ 2015-01-27 17:24 UTC (permalink / raw)
To: Chen Gang S, Peter Maydell, Riku Voipio; +Cc: QEMU Trivial, qemu-devel
25.01.2015 03:00, Chen Gang S wrote:
> In abi_long do_ioctl_dm(), after calls lock_user(), it does not call
> unlock_user() before go to failure return in default case.
Applied to -trivial, with the following description (modified just slightly,
I tried to keep original wording as much as possible):
linux-user/syscall.c: do_ioctl_dm: Need to call unlock_user() before going to failure return in default case
In abi_long do_ioctl_dm(), after lock_user() call, the code does
not call unlock_user() before going to failure return in default case.
Thank you!
/mjt
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
> linux-user/syscall.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index a427f7a..ec9e4fc 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -3566,6 +3566,7 @@ static abi_long do_ioctl_dm(const IOCTLEntry *ie, uint8_t *buf_temp, int fd,
> }
> default:
> ret = -TARGET_EINVAL;
> + unlock_user(argptr, guest_data, 0);
> goto out;
> }
> unlock_user(argptr, guest_data, 0);
> @@ -3685,6 +3686,7 @@ static abi_long do_ioctl_dm(const IOCTLEntry *ie, uint8_t *buf_temp, int fd,
> break;
> }
> default:
> + unlock_user(argptr, guest_data, 0);
> ret = -TARGET_EINVAL;
> goto out;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-27 17:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-25 0:00 [Qemu-devel] [PATCH v2] linux-user/syscall.c: Need call unlock_user() before go to failure return in default case Chen Gang S
2015-01-25 12:38 ` Peter Maydell
2015-01-27 17:24 ` Michael Tokarev
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.