linux-stable/drivers/base
Ming Lei cebf8fd169 driver core: fix race between creating/querying glue dir and its cleanup
The global mutex of 'gdp_mutex' is used to serialize creating/querying
glue dir and its cleanup. Turns out it isn't a perfect way because
part(kobj_kset_leave()) of the actual cleanup action() is done inside
the release handler of the glue dir kobject. That means gdp_mutex has
to be held before releasing the last reference count of the glue dir
kobject.

This patch moves glue dir's cleanup after kobject_del() in device_del()
for avoiding the race.

Cc: Yijing Wang <wangyijing@huawei.com>
Reported-by: Chandra Sekhar Lingutla <clingutla@codeaurora.org>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-31 15:13:55 +02:00
..
power More power management updates for v4.8-rc1 2016-08-05 23:26:16 -04:00
regmap Merge remote-tracking branches 'regmap/topic/bulk', 'regmap/topic/i2c', 'regmap/topic/iopoll', 'regmap/topic/irq' and 'regmap/topic/maintainers' into regmap-next 2016-07-15 13:44:47 +01:00
attribute_container.c
base.h
bus.c driver core: bus: use to_subsys_private and to_device_private_bus 2016-02-09 17:25:27 -08:00
cacheinfo.c
class.c
component.c Merge 4.5-rc4 into driver-core-next 2016-02-14 14:29:55 -08:00
container.c
core.c driver core: fix race between creating/querying glue dir and its cleanup 2016-08-31 15:13:55 +02:00
cpu.c
dd.c Revert "base: dd: don't remove driver_data in -EPROBE_DEFER case" 2016-05-03 08:06:06 -07:00
devcoredump.c devcoredump: add scatterlist support 2016-04-15 11:20:32 -07:00
devres.c
devtmpfs.c
dma-coherent.c drivers: dma-coherent: use memset_io for DMA_MEMORY_IO mappings 2016-03-22 15:36:02 -07:00
dma-contiguous.c
dma-mapping.c
driver.c
firmware.c
firmware_class.c firmware: support loading into a pre-allocated buffer 2016-08-02 19:35:10 -04:00
hypervisor.c
init.c
isa.c isa: Call isa_bus_init before dependent ISA bus drivers register 2016-06-17 20:47:11 -07:00
Kconfig
Makefile isa: Allow ISA-style drivers on modern systems 2016-06-17 20:21:12 -07:00
map.c
memory.c memory-hotplug: use zone_can_shift() for sysfs valid_zones attribute 2016-07-26 16:19:19 -07:00
module.c base: make module_create_drivers_dir race-free 2016-06-15 19:21:31 -07:00
node.c treewide: replace obsolete _refok by __ref 2016-08-02 17:31:41 -04:00
pinctrl.c
platform-msi.c
platform.c device property: don't bother the drivers with struct property_set 2016-04-09 03:10:50 +02:00
property.c device property: Add function to search for named child of device 2016-06-26 12:39:03 +01:00
soc.c
syscore.c
topology.c topology/sysfs: provide drawer id and siblings attributes 2016-06-13 15:58:27 +02:00
transport_class.c