* [Qemu-devel] [PATCH] Fix lock_iovec
@ 2008-01-29 16:59 Kirill A. Shutemov
2008-01-30 12:56 ` Mulyadi Santosa
0 siblings, 1 reply; 3+ messages in thread
From: Kirill A. Shutemov @ 2008-01-29 16:59 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 888 bytes --]
Do not stop iovec conversion on iov_base == NULL if iov_len is 0
---
linux-user/syscall.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index d099e97..5dc6594 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1028,7 +1028,7 @@ static abi_long lock_iovec(int type, struct iovec *vec, abi_ulong target_addr,
base = tswapl(target_vec[i].iov_base);
vec[i].iov_len = tswapl(target_vec[i].iov_len);
vec[i].iov_base = lock_user(type, base, vec[i].iov_len, copy);
- if (!vec[i].iov_base)
+ if (!vec[i].iov_base && vec[i].iov_len)
goto fail;
}
unlock_user (target_vec, target_addr, 0);
--
Regards, Kirill A. Shutemov
+ Belarus, Minsk
+ Velesys Ltd, http://www.velesys.com/
+ ALT Linux Team, http://www.altlinux.com/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix lock_iovec
2008-01-29 16:59 [Qemu-devel] [PATCH] Fix lock_iovec Kirill A. Shutemov
@ 2008-01-30 12:56 ` Mulyadi Santosa
2008-01-30 13:55 ` Kirill A. Shutemov
0 siblings, 1 reply; 3+ messages in thread
From: Mulyadi Santosa @ 2008-01-30 12:56 UTC (permalink / raw)
To: qemu-devel
Hi...
On Jan 29, 2008 11:59 PM, Kirill A. Shutemov <k.shutemov@gmail.com> wrote:
> Do not stop iovec conversion on iov_base == NULL if iov_len is 0
"is 0" or "is not 0"?
regards,
Mulyadi.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix lock_iovec
2008-01-30 12:56 ` Mulyadi Santosa
@ 2008-01-30 13:55 ` Kirill A. Shutemov
0 siblings, 0 replies; 3+ messages in thread
From: Kirill A. Shutemov @ 2008-01-30 13:55 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 486 bytes --]
On [Wed, 30.01.2008 19:56], Mulyadi Santosa wrote:
> Hi...
>
> On Jan 29, 2008 11:59 PM, Kirill A. Shutemov <k.shutemov@gmail.com> wrote:
> > Do not stop iovec conversion on iov_base == NULL if iov_len is 0
> "is 0" or "is not 0"?
For now, iovec conversion stops on iov_base == NULL, but NULL in iov_base
is correct if iov_len is 0.
--
Regards, Kirill A. Shutemov
+ Belarus, Minsk
+ Velesys Ltd, http://www.velesys.com/
+ ALT Linux Team, http://www.altlinux.com/
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-01-30 13:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-29 16:59 [Qemu-devel] [PATCH] Fix lock_iovec Kirill A. Shutemov
2008-01-30 12:56 ` Mulyadi Santosa
2008-01-30 13:55 ` Kirill A. Shutemov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).