* [Qemu-trivial] [PATCH] linux-user/syscall.c: Need call unlock_user() before go to failure return in default case
@ 2015-01-23 8:53 ` Chen Gang S
0 siblings, 0 replies; 6+ messages in thread
From: Chen Gang S @ 2015-01-23 8:53 UTC (permalink / raw)
To: 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 | 1 +
1 file changed, 1 insertion(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index aaac6a2..290fdea 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3681,6 +3681,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, guest_data_size);
--
1.9.3 (Apple Git-50)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH] linux-user/syscall.c: Need call unlock_user() before go to failure return in default case
@ 2015-01-23 8:53 ` Chen Gang S
0 siblings, 0 replies; 6+ messages in thread
From: Chen Gang S @ 2015-01-23 8:53 UTC (permalink / raw)
To: 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 | 1 +
1 file changed, 1 insertion(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index aaac6a2..290fdea 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3681,6 +3681,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, guest_data_size);
--
1.9.3 (Apple Git-50)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-trivial] [Qemu-devel] [PATCH] linux-user/syscall.c: Need call unlock_user() before go to failure return in default case
2015-01-23 8:53 ` [Qemu-devel] " Chen Gang S
@ 2015-01-23 10:01 ` Peter Maydell
-1 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2015-01-23 10:01 UTC (permalink / raw)
To: Chen Gang S; +Cc: QEMU Trivial, Riku Voipio, qemu-devel
On 23 January 2015 at 08:53, 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 | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index aaac6a2..290fdea 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -3681,6 +3681,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, guest_data_size);
> --
> 1.9.3 (Apple Git-50)
Correct as far as it goes, but notice that we have the identical
bug in the other switch (ie->host_cmd) as well...
thanks
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Need call unlock_user() before go to failure return in default case
@ 2015-01-23 10:01 ` Peter Maydell
0 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2015-01-23 10:01 UTC (permalink / raw)
To: Chen Gang S; +Cc: QEMU Trivial, Riku Voipio, qemu-devel
On 23 January 2015 at 08:53, 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 | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index aaac6a2..290fdea 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -3681,6 +3681,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, guest_data_size);
> --
> 1.9.3 (Apple Git-50)
Correct as far as it goes, but notice that we have the identical
bug in the other switch (ie->host_cmd) as well...
thanks
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-trivial] [Qemu-devel] [PATCH] linux-user/syscall.c: Need call unlock_user() before go to failure return in default case
2015-01-23 10:01 ` Peter Maydell
@ 2015-01-23 10:19 ` Chen Gang S
-1 siblings, 0 replies; 6+ messages in thread
From: Chen Gang S @ 2015-01-23 10:19 UTC (permalink / raw)
To: Peter Maydell; +Cc: QEMU Trivial, Riku Voipio, qemu-devel
On 1/23/15 18:01, Peter Maydell wrote:
> On 23 January 2015 at 08:53, 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 | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
>> index aaac6a2..290fdea 100644
>> --- a/linux-user/syscall.c
>> +++ b/linux-user/syscall.c
>> @@ -3681,6 +3681,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, guest_data_size);
>> --
>> 1.9.3 (Apple Git-50)
>
> Correct as far as it goes, but notice that we have the identical
> bug in the other switch (ie->host_cmd) as well...
>
Oh, really, thanks. I shall send patch v2 for it, if no additional reply
within 2 days.
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Need call unlock_user() before go to failure return in default case
@ 2015-01-23 10:19 ` Chen Gang S
0 siblings, 0 replies; 6+ messages in thread
From: Chen Gang S @ 2015-01-23 10:19 UTC (permalink / raw)
To: Peter Maydell; +Cc: QEMU Trivial, Riku Voipio, qemu-devel
On 1/23/15 18:01, Peter Maydell wrote:
> On 23 January 2015 at 08:53, 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 | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
>> index aaac6a2..290fdea 100644
>> --- a/linux-user/syscall.c
>> +++ b/linux-user/syscall.c
>> @@ -3681,6 +3681,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, guest_data_size);
>> --
>> 1.9.3 (Apple Git-50)
>
> Correct as far as it goes, but notice that we have the identical
> bug in the other switch (ie->host_cmd) as well...
>
Oh, really, thanks. I shall send patch v2 for it, if no additional reply
within 2 days.
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-01-23 10:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-23 8:53 [Qemu-trivial] [PATCH] linux-user/syscall.c: Need call unlock_user() before go to failure return in default case Chen Gang S
2015-01-23 8:53 ` [Qemu-devel] " Chen Gang S
2015-01-23 10:01 ` [Qemu-trivial] " Peter Maydell
2015-01-23 10:01 ` Peter Maydell
2015-01-23 10:19 ` [Qemu-trivial] " Chen Gang S
2015-01-23 10:19 ` Chen Gang S
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.