linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] drivers/base: bugfix for supplier<-consumer ordering in device_kset
@ 2018-06-25  5:23 Pingfan Liu
  2018-06-25  5:23 ` [PATCH 1/3] drivers/base: introduce some help routines for reordering a group of dev Pingfan Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Pingfan Liu @ 2018-06-25  5:23 UTC (permalink / raw)
  To: linux-kernel
  Cc: Pingfan Liu, Greg Kroah-Hartman, Grygorii Strashko,
	Christoph Hellwig, Bjorn Helgaas, Dave Young, linux-pci,
	linuxppc-dev

commit 52cdbdd49853 ("driver core: correct device's shutdown order")
places an assumption of supplier<-consumer order on the process of probe.
But it turns out to break down the parent <- child order in some scene.
E.g in pci, a bridge is enabled by pci core, and behind it, the devices
have been probed. Then comes the bridge's module, which enables extra
feature(such as hotplug) on this bridge.
This will break the parent<-children order and cause failure when
"kexec -e" in some scenario.

I tried to fix this issue in pci subsystem, and it turns out to be wrong.
Thanks to Christoph Hellwig, he enlightens me that it should be a bug in
driver core.

To ease the review, I organize the patch as the following
[3/3] reflects the root cause of this bug. if [2/3] is not acceptable,
we still need some way to fix it.
[2/3] introduce a algorithm to reorder device
[1/3] some trivial help routine


Pingfan Liu (3):
  drivers/base: introduce some help routines for reordering a group of
    dev
  drivers/base: reorder consumer and its children behind suppliers
  drivers/base: only reordering consumer device when probing

 drivers/base/base.h |   1 +
 drivers/base/core.c | 135 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/base/dd.c   |   9 +---
 3 files changed, 138 insertions(+), 7 deletions(-)

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Bjorn Helgaas <helgaas@kernel.org>
Cc: Dave Young <dyoung@redhat.com>
Cc: linux-pci@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
-- 
2.7.4

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-06-28 13:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-25  5:23 [PATCH 0/3] drivers/base: bugfix for supplier<-consumer ordering in device_kset Pingfan Liu
2018-06-25  5:23 ` [PATCH 1/3] drivers/base: introduce some help routines for reordering a group of dev Pingfan Liu
2018-06-25  6:41   ` Greg Kroah-Hartman
2018-06-25  7:08     ` Pingfan Liu
2018-06-25  5:23 ` [PATCH 2/3] drivers/base: reorder consumer and its children behind suppliers Pingfan Liu
2018-06-26  7:44   ` Dan Carpenter
2018-06-27  2:34     ` Pingfan Liu
2018-06-27  8:34       ` Dan Carpenter
2018-06-28 13:47         ` Pingfan Liu
2018-06-25  5:23 ` [PATCH 3/3] drivers/base: only reordering consumer device when probing Pingfan Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).