diff options
author | Lukas Wunner <lukas@wunner.de> | 2016-07-27 20:25:41 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-08-30 18:28:29 -0400 |
commit | 478573c93abd369c4850de55c387be43aa01e2e8 (patch) | |
tree | 01a3d0fa8400845fb034a2e2eff2a106518192cb /drivers/base | |
parent | 3eab887a55424fc2c27553b7bfe32330df83f7b8 (diff) |
driver core: Don't leak secondary fwnode on device removal
If device_add_property_set() is called for a device, a secondary fwnode
is allocated and assigned to the device but currently not freed once the
device is removed.
This can be triggered on Apple Macs if a Thunderbolt device is plugged
in on boot since Apple's NHI EFI driver sets a number of properties for
that device which are leaked on unplug.
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 0a8bdade53f2..70c5be5b03a7 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -1266,6 +1266,7 @@ void device_del(struct device *dev) | |||
1266 | bus_remove_device(dev); | 1266 | bus_remove_device(dev); |
1267 | device_pm_remove(dev); | 1267 | device_pm_remove(dev); |
1268 | driver_deferred_probe_del(dev); | 1268 | driver_deferred_probe_del(dev); |
1269 | device_remove_properties(dev); | ||
1269 | 1270 | ||
1270 | /* Notify the platform of the removal, in case they | 1271 | /* Notify the platform of the removal, in case they |
1271 | * need to do anything... | 1272 | * need to do anything... |