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-devel

[Xen-devel] netfront leaking two pages on unload?

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] netfront leaking two pages on unload?
From: Andy Grover <andy.grover@xxxxxxxxxx>
Date: Wed, 16 Jan 2008 13:16:28 -0800
Delivery-date: Wed, 16 Jan 2008 13:17:14 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi all,

It appears netfront is leaking 2 pages (info->tx.sring and rx.sring) on
netfront unload, because netback is not unmapping them when entering the
Closed state.

I came across this while working on the Windows Xennet driver unload
routines. I am trying to end access to those two pages after both
netfront and netback are in the "Closed" state (having passed through
"Closing") but they are still in use.

See below from netback/xenbus.c. Backend is online:

case XenbusStateClosed:
        xenbus_switch_state(dev, XenbusStateClosed);
        if (xenbus_dev_is_online(dev))
                break;
        /* fall through if not online */

Should it instead be:

case XenbusStateClosed:
        if (xenbus_dev_is_online(dev)) {
                struct backend_info *be = dev->dev.driver_data;
                netif_disconnect(be->netif);
                break;
        }
        xenbus_switch_state(dev, XenbusStateClosed);
        /* fall through if not online */

?

Otherwise the pages cannot be freed properly in the guest, right?

Thanks -- Regards -- Andy



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

<Prev in Thread] Current Thread [Next in Thread>