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] Fix race between sending responses to the guest frontend

To: xen-changelog@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix race between sending responses to the guest frontend driver and guest
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Fri, 25 Mar 2005 19:09:13 +0000
Delivery-date: Fri, 25 Mar 2005 23:04:35 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-changelog>
List-help: <mailto:xen-changelog-request@lists.sourceforge.net?subject=help>
List-id: <xen-changelog.lists.sourceforge.net>
List-post: <mailto:xen-changelog@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.sourceforge.net?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-admin@xxxxxxxxxxxxxxxxxxxxx
ChangeSet 1.1372.1.1, 2005/03/25 19:09:13+00:00, cl349@xxxxxxxxxxxxxxxxxxxx

        Fix race between sending responses to the guest frontend driver and 
guest
        adding new requests.
        Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>



 blktap.h         |    2 ++
 blktap_userdev.c |    5 ++---
 2 files changed, 4 insertions(+), 3 deletions(-)


diff -Nru a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap.h 
b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap.h
--- a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap.h       2005-03-25 
18:03:17 -05:00
+++ b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap.h       2005-03-25 
18:03:17 -05:00
@@ -30,6 +30,8 @@
 
 /* -------[ debug / pretty printing ]--------------------------------- */
 
+#define PRINTK(_f, _a...) printk(KERN_ALERT "(file=%s, line=%d) " _f, \
+                           __FILE__ , __LINE__ , ## _a )
 #if 0
 #define DPRINTK(_f, _a...) printk(KERN_ALERT "(file=%s, line=%d) " _f, \
                            __FILE__ , __LINE__ , ## _a )
diff -Nru a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c 
b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c
--- a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c       
2005-03-25 18:03:17 -05:00
+++ b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c       
2005-03-25 18:03:17 -05:00
@@ -299,7 +299,7 @@
     }
 
     if ( RING_FULL(&blktap_ufe_ring) ) {
-        DPRINTK("blktap: fe_ring is full, can't add.\n");
+        PRINTK("blktap: fe_ring is full, can't add.\n");
         return 0;
     }
 
@@ -383,10 +383,9 @@
             zap_page_range(blktap_vma, MMAP_VADDR(ID_TO_IDX(resp_s->id), 0), 
                     ar->nr_pages << PAGE_SHIFT, NULL);
             write_resp_to_fe_ring(blkif, resp_s);
+            blktap_ufe_ring.rsp_cons = i + 1;
             kick_fe_domain(blkif);
         }
-        
-        blktap_ufe_ring.rsp_cons = i;
     }
     return 0;
 }


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix race between sending responses to the guest frontend driver and guest, BitKeeper Bot <=