qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <k.shutemov@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Fix lock_iovec
Date: Tue, 29 Jan 2008 18:59:56 +0200	[thread overview]
Message-ID: <20080129165956.GA27300@localhost.localdomain> (raw)

[-- 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 --]

             reply	other threads:[~2008-01-30 12:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-29 16:59 Kirill A. Shutemov [this message]
2008-01-30 12:56 ` [Qemu-devel] [PATCH] Fix lock_iovec Mulyadi Santosa
2008-01-30 13:55   ` Kirill A. Shutemov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080129165956.GA27300@localhost.localdomain \
    --to=k.shutemov@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).