[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

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))
        /* 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;
        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



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.