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] [day] [month] [year] [list]
Date:	Mon, 23 Oct 2006 14:47:21 +1000
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Greg KH <greg@...ah.com>
Cc:	Linux Kernel list <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...l.org>, Len Brown <len.brown@...el.com>,
	Deepak Saxena <dsaxena@...xity.net>
Subject: [PATCH] Call platform_notify_remove later

This patch moves the call to platform_notify_remove() to after the call
to bus_remove_device(), where it belongs. It's bogus to notify the
platform of removal while drivers are still attached to the device and
possibly still operating since the platform might use this callback to
tear down some resources used by the driver (ACPI bits, iommu
table, ...)

Signed-off-by: Benjamin Herrenschmidt <benh@...nel.crashing.org>
---

Note that Len Browned wrote "AFAICS, your change is logical and should
be fine." which I consider an ACK, though I didn't add an Acked-by
line :)

This patch should go in imho after 2.6.19 (it might even be considered a
bug fix for 2.6.19 but it's probably not bad enough, so let's have it
simmer in your tree and -mm for a little while).

This is orthogonal to my other patch adding a notifier which we can
continue discussing separately.

Index: linux-cell/drivers/base/core.c
===================================================================
--- linux-cell.orig/drivers/base/core.c	2006-10-06 13:48:02.000000000 +1000
+++ linux-cell/drivers/base/core.c	2006-10-18 11:53:50.000000000 +1000
@@ -608,12 +608,13 @@ void device_del(struct device * dev)
 	device_remove_groups(dev);
 	device_remove_attrs(dev);
 
+	bus_remove_device(dev);
+
 	/* Notify the platform of the removal, in case they
 	 * need to do anything...
 	 */
 	if (platform_notify_remove)
 		platform_notify_remove(dev);
-	bus_remove_device(dev);
 	device_pm_remove(dev);
 	kobject_uevent(&dev->kobj, KOBJ_REMOVE);
 	kobject_del(&dev->kobj);
 


-
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