[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <494971B6.6040508@goop.org>
Date: Wed, 17 Dec 2008 13:40:06 -0800
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Andrew Morton <akpm@...ux-foundation.org>
CC: mingo@...e.hu, viro@....linux.org.uk, linux-kernel@...r.kernel.org,
xen-devel@...ts.xensource.com, alex.zeffertt@...citrix.com,
Ian.Campbell@...rix.com
Subject: Re: [PATCH UPDATED] xen/xenfs: fix xenbus message reads
Compute the remaining data size properly.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists