[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Reinitialize producer and consumer index to 0 if indexes corruption are detected
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |