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

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


  • To: Andy Grover <andy.grover@xxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
  • Date: Thu, 17 Jan 2008 15:48:45 +0000
  • Delivery-date: Thu, 17 Jan 2008 07:50:24 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AchZIHEEr98K28UTEdyOuwAX8io7RQ==
  • Thread-topic: [Xen-devel] netfront leaking two pages on unload?

On 16/1/08 21:16, "Andy Grover" <andy.grover@xxxxxxxxxx> wrote:

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

Well, I think you've chosen slightly the wrong place, so I've just committed
a change that makes the close-down logic more like in blkback. Possibly the
reason we didn't follow that same logic before is that netif_disconnect()
also makes the network device in dom0 also go away, which might cause
unwanted chnages to routing and firewall rules, execution of hotplug
scripts, etc. But we can separate the concepts of relinquishing frontend
resources and destroying the backend netdev later if it turns out to be
necessary.

 -- Keir



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


 


Rackspace

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