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

Re: [Xen-devel] Backend in user space, how is its kernel dev unregistere

To: Markus Armbruster <armbru@xxxxxxxxxx>
Subject: Re: [Xen-devel] Backend in user space, how is its kernel dev unregistered?
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Thu, 05 Mar 2009 13:18:32 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 05 Mar 2009 05:20:35 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <87y6vkw3b5.fsf@xxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acmdj5SbK3ulP7AvTw6+tnKL3IS/MAABUzbR
Thread-topic: [Xen-devel] Backend in user space, how is its kernel dev unregistered?
User-agent: Microsoft-Entourage/12.15.0.081119
On 05/03/2009 12:40, "Markus Armbruster" <armbru@xxxxxxxxxx> wrote:

> Let me elaborate.
> 
> Backend device registration is split between xenbus_probe.c
> (registering) and the backend device driver (unregistering).  When a
> device node shows up in xenstore, xenbus_probe_node() calls
> device_register().  When the backend driver sees the frontend shut down,
> it calls device_unregister().  For an example see frontend_changed() in
> drivers/xen/blkback/xenbus.c.
> 
> The vfb and vkbd backends live in user space, i.e. there is no backend
> driver in the kernel.  device_unregister() never gets called.  This is a
> resource leak.
> 
> Does this explain the problem sufficienctly?

Ah yes, I think that makes sense. Does xenbus_probe really do a
device_register() despite not finding a backend kernel driver to handles the
device? That would sound like the source of the problem, to me.

 -- Keir



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