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] "kobject add failed"

To: "Petersson, Mats" <Mats.Petersson@xxxxxxx>, "Keir Fraser" <keir@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-devel] "kobject add failed"
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: Mon, 14 May 2007 18:37:18 +0200
Delivery-date: Mon, 14 May 2007 09:36:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <907625E08839C4409CE5768403633E0B018E1CC6@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/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
Thread-index: AceNmT0esnMamshHQgCftANOeSweVQACJPy4AAAGsIAAAMJU7AAAcFqwAABf97AAAA0DMAInV7AA
Thread-topic: [Xen-devel] "kobject add failed"
> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Petersson, Mats
> Sent: 03 May 2007 18:37
> To: Keir Fraser; xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: RE: [Xen-devel] "kobject add failed"
> 
>  
> 
> > -----Original Message-----
> > From: Keir Fraser [mailto:keir@xxxxxxxxxxxxx] 
> > Sent: 03 May 2007 18:27
> > To: Petersson, Mats; xen-devel@xxxxxxxxxxxxxxxxxxx
> > Subject: Re: [Xen-devel] "kobject add failed"
> > 
> > 
> > 
> > 
> > On 3/5/07 18:19, "Petersson, Mats" <Mats.Petersson@xxxxxxx> wrote:
> > 
> > >> However, the invocation of tun_set_iff() is wrapped in
> > >> rtnl_lock()/unlock()
> > >> so should be concurrency safe. Still, this is where I would
> > >> concentrate my
> > >> search if I were you.
> > > 
> > > Indeed, the tun_set_iff() is protected by 
> rtnl_lock/unlock()... Any
> > > reason to believe that doesn't work?
> > 
> > Your crash report. :-)
> > 
> > However tun_set_iff() is not in the oops backtrace... Perhaps 
> > I'm wrong
> > about which ioctl is being executed, or the path taken 
> > through the Linux
> > kernel.
> 
> According to my dump of the tun.o object file, "tun_set_iff" 
> is inlined
> into tun_chr_ioctl(), so it's no real surprise it's not in the
> call-stack... 

Just to get back to this rather old subject (I got side-tracked with the
"stuff left in xenstore" problem last week), here's the comment for
register_netdevice:

/**
 *      register_netdevice      - register a network device
 *      @dev: device to register
 *
 *      Take a completed network device structure and add it to the
kernel
 *      interfaces. A %NETDEV_REGISTER message is sent to the netdev
notifier
 *      chain. 0 is returned on success. A negative errno code is
returned
 *      on a failure to set up the device, or if the name is a
duplicate.
 *
 *      Callers must hold the rtnl semaphore. You may want
 *      register_netdev() instead of this.
 *
 *      BUGS:
 *      The locking appears insufficient to guarantee two parallel
registers
 *      will not get the same name.
 */

So it seems like there's a problem using the mutex-locking to prevent a
name-collision. 

I don't know if I should pursue this... I presume that if it was real
trivial to fix, it would have been fixed already... ;-)

--
Mats



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