linux_dsm_epyc7002/drivers/base
Catalin Marinas 0f2f2221b4 Free struct device in fw_dev_release()
The f_dev in _request_firmware() is allocated via the fw_setup_device()
and fw_register_device() calls and its class set to firmware_class (the
class release function is fw_dev_release).

Commit 6acf70f078 replaced the kfree(dev) in fw_dev_release() with a
put_device() call but my understanding is that the release function is
called via put_device -> kobject_put -> kref_put -> koject_release etc.
and it should call kfree since it's the last to see this device
structure alive.

Because of that, the _request_firmware() function on its -ENOENT error
path only calls device_unregister(f_dev) which would eventually call
fw_dev_release() but there is no kfree (the subsequent put_device call
would just make the kref negative).

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-07-08 09:34:08 -07:00
..
power PM: Remove device_type suspend()/resume() 2009-06-12 21:32:32 +02:00
attribute_container.c
base.h driver core: fix driver_match_device 2009-04-16 16:17:09 -07:00
bus.c trivial: fix grammo in bus_for_each_dev() kerneldoc 2009-06-12 18:01:48 +02:00
class.c
core.c Driver Core: add nodename callbacks 2009-06-15 21:30:25 -07:00
cpu.c cpumask: use new cpumask_ functions in core code. 2009-03-30 22:05:16 +10:30
dd.c Driver core: fix comment for device_attach() 2009-06-15 21:30:24 -07:00
devres.c
dma-mapping.c
driver.c Driver Core: do not oops when driver_unregister() is called for unregistered drivers 2009-05-28 14:24:07 -07:00
firmware_class.c Free struct device in fw_dev_release() 2009-07-08 09:34:08 -07:00
firmware.c
hypervisor.c
init.c
iommu.c drivers/base/iommu.c: add missing includes 2009-05-06 16:36:10 -07:00
isa.c dma-mapping: replace all DMA_24BIT_MASK macro with DMA_BIT_MASK(24) 2009-04-07 08:31:12 -07:00
Kconfig
Makefile
map.c
memory.c
module.c
node.c mm: remove CONFIG_UNEVICTABLE_LRU config option 2009-06-16 19:47:42 -07:00
platform.c driver core: fix gcc 4.3.3 warnings about string literals 2009-06-15 21:30:25 -07:00
sys.c driver core: fix gcc 4.3.3 warnings about string literals 2009-06-15 21:30:25 -07:00
topology.c
transport_class.c