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] Reinitialize producer and consumer index to 0 if indexes

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Reinitialize producer and consumer index to 0 if indexes corruption are detected
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 17 Mar 2006 18:22:23 +0000
Delivery-date: Fri, 17 Mar 2006 18:24:02 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 vhanquez@xxxxxxxxxxxxxxxxxxxxxxx
# Node ID 98a6f5ae7b1ffcd284e077f6d1439cb4e9adf2f2
# Parent  56ec142bdd91c6ecdc2395d7c21534efd893a14a
Reinitialize producer and consumer index to 0 if indexes corruption are detected
in XenBus.
Prevent a kernel infinite loop and add more recovering ability.

Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>

diff -r 56ec142bdd91 -r 98a6f5ae7b1f 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c    Fri Mar 17 
09:52:05 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c    Fri Mar 17 
10:03:37 2006
@@ -106,8 +106,10 @@
                cons = intf->req_cons;
                prod = intf->req_prod;
                mb();
-               if (!check_indexes(cons, prod))
+               if (!check_indexes(cons, prod)) {
+                       intf->req_cons = intf->req_prod = 0;
                        return -EIO;
+               }
 
                dst = get_output_chunk(cons, prod, intf->req, &avail);
                if (avail == 0)
@@ -150,8 +152,10 @@
                cons = intf->rsp_cons;
                prod = intf->rsp_prod;
                mb();
-               if (!check_indexes(cons, prod))
+               if (!check_indexes(cons, prod)) {
+                       intf->rsp_cons = intf->rsp_prod = 0;
                        return -EIO;
+               }
 
                src = get_input_chunk(cons, prod, intf->rsp, &avail);
                if (avail == 0)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Reinitialize producer and consumer index to 0 if indexes corruption are detected, Xen patchbot -unstable <=