From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: mingo@elte.hu, viro@ftp.linux.org.uk,
linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com,
alex.zeffertt@eu.citrix.com, Ian.Campbell@citrix.com
Subject: Re: [PATCH UPDATED] xen/xenfs: fix xenbus message reads
Date: Wed, 17 Dec 2008 13:40:06 -0800 [thread overview]
Message-ID: <494971B6.6040508@goop.org> (raw)
In-Reply-To: <49496E17.2010703@goop.org>
Compute the remaining data size properly.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
drivers/xen/xenfs/xenbus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
===================================================================
--- a/drivers/xen/xenfs/xenbus.c
+++ b/drivers/xen/xenfs/xenbus.c
@@ -132,7 +132,7 @@
rb = list_entry(u->read_buffers.next, struct read_buffer, list);
i = 0;
while (i < len) {
- unsigned sz = min((unsigned)len - i, rb->cons - rb->len);
+ unsigned sz = min((unsigned)len - i, rb->len - rb->cons);
ret = copy_to_user(ubuf + i, &rb->msg[rb->cons], sz);
prev parent reply other threads:[~2008-12-17 21:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-16 20:27 [PATCH] xen: add xenfs to allow usermode <-> Xen interaction Jeremy Fitzhardinge
2008-12-16 20:46 ` Ingo Molnar
2008-12-16 20:54 ` Andrew Morton
2008-12-16 22:43 ` Jeremy Fitzhardinge
2008-12-17 21:24 ` [PATCH UPDATED] " Jeremy Fitzhardinge
2008-12-17 21:34 ` Andrew Morton
2008-12-17 21:50 ` Jeremy Fitzhardinge
2008-12-18 13:18 ` Ingo Molnar
2008-12-17 21:40 ` Jeremy Fitzhardinge [this message]
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=494971B6.6040508@goop.org \
--to=jeremy@goop.org \
--cc=Ian.Campbell@citrix.com \
--cc=akpm@linux-foundation.org \
--cc=alex.zeffertt@eu.citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=viro@ftp.linux.org.uk \
--cc=xen-devel@lists.xensource.com \
/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 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.