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]
Message-ID: <20120709145831.GB3961@kroah.com>
Date:	Mon, 9 Jul 2012 07:58:31 -0700
From:	Greg KH <greg@...ah.com>
To:	Li Yang-R58472 <r58472@...escale.com>
Cc:	Jia Hongtao-B38951 <B38951@...escale.com>,
	Rob Herring <robherring2@...il.com>,
	"devicetree-discuss@...ts.ozlabs.org" 
	<devicetree-discuss@...ts.ozlabs.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V3 5/6] Avoid duplicate probe for of platform devices

On Mon, Jul 09, 2012 at 03:46:59AM +0000, Li Yang-R58472 wrote:
> > > I don't understand, why is this just showing up now?  What changed to
> > > cause this?  Couldn't that be the real problem here?
> > >
> > 
> > The issue is showing up because we now probe devices twice.
> > Previously, we just probe devices once. But now we changed the way of pci
> > init which makes pci controllers should be probed earlier than other
> > devices.
> > So we have to probe pci nodes separately. Probe more than once is the
> > root
> > cause of this issue.
> > 
> > The pci patchset I mentioned please refer to:
> > http://patchwork.ozlabs.org/patch/163742/
> 
> Let me try to clarify a little bit.  The of platform bus normally
> traverse the device tree to add all the devices.  The change which
> caused problem is that we need to probe PCIe RC devices at a earlier
> stage of initialization.

That sounds, wrong.

> So we added these PCIe RC devices earlier than the normal device tree
> traversal process.  These PCIe RC devices will be scanned again during
> the normal traversal and cause duplicated devices being added.  Our
> proposal is to deal with duplicated devices automatically and make it
> possible to scan the device tree multiple times for devices to be
> added. 

Then you need to put something in your own tree scanning logic to not
try to register devices multiple times.  How about a simple flag in your
device structure instead of having to muck around in the driver core
internals?

Although one should seriously question the need to want to recan the bus
and register devices at different times of the boot process...

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