Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] PCI: don't override drv->shutdown unconditionally

There are many drivers that have been setting the generic driver
model level shutdown callback, and pci thus must not override it.

Without this patch we can have really bad data loss on various
raid controllers.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Christoph Hellwig and committed by
Linus Torvalds
794f5bfa caf2857a

+4 -1
+4 -1
drivers/pci/pci-driver.c
··· 393 393 drv->driver.bus = &pci_bus_type; 394 394 drv->driver.probe = pci_device_probe; 395 395 drv->driver.remove = pci_device_remove; 396 - drv->driver.shutdown = pci_device_shutdown, 396 + /* FIXME, once all of the existing PCI drivers have been fixed to set 397 + * the pci shutdown function, this test can go away. */ 398 + if (!drv->driver.shutdown) 399 + drv->driver.shutdown = pci_device_shutdown, 397 400 drv->driver.owner = drv->owner; 398 401 drv->driver.kobj.ktype = &pci_driver_kobj_type; 399 402 pci_init_dynids(&drv->dynids);