lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 11 Apr 2011 10:56:28 -0700
From:	Greg KH <gregkh@...e.de>
To:	Sebastian Ott <sebott@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: sysfs: cannot create duplicate filename

On Mon, Apr 11, 2011 at 07:50:34PM +0200, Sebastian Ott wrote:
> 
> 
> On Mon, 11 Apr 2011, Greg KH wrote:
> 
> > On Mon, Apr 11, 2011 at 05:05:08PM +0200, Sebastian Ott wrote:
> > > 
> > > 
> > > On Mon, 11 Apr 2011, Greg KH wrote:
> > > 
> > > > On Mon, Apr 11, 2011 at 04:33:03PM +0200, Sebastian Ott wrote:
> > > > > On Mon, 11 Apr 2011, Greg KH wrote:
> > > > > 
> > > > > > On Mon, Apr 11, 2011 at 04:04:08PM +0200, Sebastian Ott wrote:
> > > > > > > Hi,
> > > > > > > 
> > > > > > > i've seen this warning which looks to be caused by a race between device_add
> > > > > > > and driver_register
> > > > > > > 
> > > > > > > [   80.893594] sysfs: cannot create duplicate filename '/bus/ccw/drivers/qeth/0.0.b57d'
> > > > > > 
> > > > > > Isn't the problem here the fact that you are creating 2 directories of
> > > > > > the same name?
> > > > > I'm sure this isn't the case here. The bus code just calls device_add and
> > > > > at the same time on a different thread a module is loaded which registers
> > > > > a driver at the bus.
> > > > > 
> > > > > I was able to reproduce this with a module which creates a dummy bus
> > > > > and registers drivers and devices on this bus on 2 different workqueues.
> > > > 
> > > > That makes sense, as no bus should be doing this on multiple "threads".
> > > > What real-life bus does this today?
> > > A bus that will recognize and register a lot of devices, after the first
> > > uevent is presented to userspace, a module will be loaded registering a
> > > driver from a different thread. I don't think thats uncommon.
> > 
> > But again, what kernel code today does this?  I think they all have
> > locks to keep this from happening, right?
> I couldn't find a bus who protects device_register against driver_register
> and I don't think this is something which should be handled by every
> individual bus but from within the driver core.

How did you cause the oops in this original message?  What type of bus
was it on?  And did your patch solve the issue?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ