WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] blktap: bugfix and support extended d

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] blktap: bugfix and support extended device numbers
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 27 Jun 2008 13:00:13 -0700
Delivery-date: Fri, 27 Jun 2008 13:00:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1214579276 -3600
# Node ID b29a06ba7a5ff8c85054d56a4135ac38925422c0
# Parent  65faf5fc61a1cadb20885dc2e926efe1722956fd
blktap: bugfix and support extended device numbers

This simple patch puts two fixes into the blktap backend.  The first
is a change of busid from an unsigned short to a u32 so we can
accommodate the new expanded format (which doesn't fit into 16-bits).
The second is a minor fix to signal_tapdisk(); while developing, if
the tools happen to set up the tapfds wrong, you can get into a
situation where the idx passed to signal_tapdisk() is NULL, causing a
kernel OOPS.  The fix for signal_tapdisk() just returns if the idx is
negative, preventing the crash.

Signed-off-by: Chris Lalancette <clalance@xxxxxxxxxx>
---
 drivers/xen/blktap/blktap.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletion(-)

diff -r 65faf5fc61a1 -r b29a06ba7a5f drivers/xen/blktap/blktap.c
--- a/drivers/xen/blktap/blktap.c       Fri Jun 27 16:06:41 2008 +0100
+++ b/drivers/xen/blktap/blktap.c       Fri Jun 27 16:07:56 2008 +0100
@@ -89,7 +89,7 @@ static int mmap_pages = MMAP_PAGES;
 /*Data struct handed back to userspace for tapdisk device to VBD mapping*/
 typedef struct domid_translate {
        unsigned short domid;
-       unsigned short busid;
+       u32 busid;
 } domid_translate_t ;
 
 /*Data struct associated with each of the tapdisk devices*/
@@ -508,6 +508,13 @@ void signal_tapdisk(int idx)
        tap_blkif_t *info;
        struct task_struct *ptask;
 
+       /*
+        * if the userland tools set things up wrong, this could be negative;
+        * just don't try to signal in this case
+        */
+       if (idx < 0)
+               return;
+
        info = tapfds[idx];
        if ((idx < 0) || (idx > MAX_TAP_DEV) || !info)
                return;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] blktap: bugfix and support extended device numbers, Xen patchbot-linux-2.6.18-xen <=