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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 18 Oct 2017 19:28:38 +0800
From:   Jeffy Chen <jeffy.chen@...k-chips.com>
To:     linux-kernel@...r.kernel.org
Cc:     seanpaul@...omium.irg, briannorris@...omium.org, heiko@...ech.de,
        gregkh@...uxfoundation.org, dmitry.torokhov@...il.com,
        rjw@...ysocki.net, dianders@...omium.org, tfiga@...omium.org,
        broonie@...nel.org, thierry.reding@...il.com,
        Jeffy Chen <jeffy.chen@...k-chips.com>
Subject: [PATCH] driver core: Move device_links_purge() after bus_remove_device()

Currently we are unbinding device link consumers when detaching the
supplier. So we need to make sure the detaching happens before purging
the supplier's device links.

Move device_links_purge() after bus_remove_device() in device_del()
for that.

Signed-off-by: Jeffy Chen <jeffy.chen@...k-chips.com>
---

 drivers/base/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index 12ebd055724c..2e683cdf4a08 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1958,7 +1958,6 @@ void device_del(struct device *dev)
 		blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
 					     BUS_NOTIFY_DEL_DEVICE, dev);
 
-	device_links_purge(dev);
 	dpm_sysfs_remove(dev);
 	if (parent)
 		klist_del(&dev->p->knode_parent);
@@ -1986,6 +1985,7 @@ void device_del(struct device *dev)
 	device_pm_remove(dev);
 	driver_deferred_probe_del(dev);
 	device_remove_properties(dev);
+	device_links_purge(dev);
 
 	/* Notify the platform of the removal, in case they
 	 * need to do anything...
-- 
2.11.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ