[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Fix lock_iovec
From: |
Kirill A. Shutemov |
Subject: |
[Qemu-devel] [PATCH] Fix lock_iovec |
Date: |
Tue, 29 Jan 2008 18:59:56 +0200 |
User-agent: |
Mutt/1.5.17 (2007-11-01) |
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/
signature.asc
Description: Digital signature
- [Qemu-devel] [PATCH] Fix lock_iovec,
Kirill A. Shutemov <=