+ xen-add-xenfs-to-allow-usermode-xen-interaction-fix-xenbus-message-reads.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     xen/xenfs: fix xenbus message reads
has been added to the -mm tree.  Its filename is
     xen-add-xenfs-to-allow-usermode-xen-interaction-fix-xenbus-message-reads.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: xen/xenfs: fix xenbus message reads
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>

Compute the remaining data size properly.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
Cc: Alex Zeffertt <alex.zeffertt@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/xen/xenfs/xenbus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/xen/xenfs/xenbus.c~xen-add-xenfs-to-allow-usermode-xen-interaction-fix-xenbus-message-reads drivers/xen/xenfs/xenbus.c
--- a/drivers/xen/xenfs/xenbus.c~xen-add-xenfs-to-allow-usermode-xen-interaction-fix-xenbus-message-reads
+++ a/drivers/xen/xenfs/xenbus.c
@@ -132,7 +132,7 @@ static ssize_t xenbus_file_read(struct f
 	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);
 
_

Patches currently in -mm which might be from jeremy@xxxxxxxx are

linux-next.patch
mm-apply_to_range-call-pte-function-with-lazy-updates.patch
drivers-xen-xenbus-xenbus_clientc-cleanup-kerneldoc.patch
xen-add-xenfs-to-allow-usermode-xen-interaction-fix-xenbus-message-reads.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux