android_kernel_google_msm/drivers/base
Alistair Strachan 509a910962 sync: Fix a race condition between release_obj and print_obj
Before this change, a timeline would only be removed from the timeline
list *after* the sync driver had its release_obj() called. However, the
driver's release_obj() may free resources needed by print_obj().

Although the timeline list is locked when print_obj() is called, it is
not locked when release_obj() is called. If one CPU was in print_obj()
when another was in release_obj(), the print_obj() may make unsafe
accesses.

It is not actually necessary to hold the timeline list lock when calling
release_obj() if the call is made after the timeline is unlinked from
the list, since there is no possibility another thread could be in --
or enter -- print_obj() for that timeline.

This change moves the release_obj() call to after the timeline is
unlinked, preventing the above race from occurring.

Signed-off-by: Alistair Strachan <alistair.strachan@imgtec.com>
Signed-off-by: Ed Tam <etam@google.com>
2013-12-09 16:11:59 -08:00
..
power PM: Allow runtime suspend again if prepare is failed 2013-03-15 17:09:28 -07:00
regmap regmap: fix possible memory corruption in regmap_bulk_read() 2012-05-09 15:44:11 +01:00
attribute_container.c
base.h drivers: Resurrect sysdev 2013-02-25 11:29:18 -08:00
bus.c Merge 3.3-rc2 into the driver-core-next branch. 2012-02-02 11:24:44 -08:00
class.c driver-core: implement 'sysdev' functionality for regular devices and buses 2011-12-14 14:29:38 -08:00
core.c Core device tree changes for Linux v3.4 2012-03-21 10:30:03 -07:00
cpu.c Merge 3.3-rc6 into driver-core-next 2012-03-09 12:35:53 -08:00
dd.c driver core: minor comment formatting cleanups 2012-03-08 12:20:37 -08:00
devres.c devres: Fix a typo in devm_kfree comment 2011-12-21 00:31:47 +01:00
devtmpfs.c Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-01-08 12:19:57 -08:00
dma-buf.c dma-buf: mmap support 2012-05-22 14:01:06 -07:00
dma-coherent.c common: add dma_mmap_from_coherent() function 2013-02-27 18:21:21 -08:00
dma-contiguous.c drivers: add Contiguous Memory Allocator 2013-02-27 18:14:15 -08:00
dma-mapping.c
driver.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-03-21 18:55:10 -07:00
firmware.c
firmware_class.c firmware_class: Move request_firmware_nowait() to workqueues 2012-03-28 23:31:00 +02:00
genlock.c Update copyright to The Linux Foundation 2013-03-15 17:07:39 -07:00
hypervisor.c
init.c driver-core: implement 'sysdev' functionality for regular devices and buses 2011-12-14 14:29:38 -08:00
isa.c
Kconfig drivers: add Contiguous Memory Allocator 2013-02-27 18:14:15 -08:00
Makefile drivers: add Contiguous Memory Allocator 2013-02-27 18:14:15 -08:00
map.c
memory.c Linux 3.3-rc7 2012-03-14 07:44:11 +01:00
module.c
node.c drivers/base/memory.c: fix memory_dev_init() long delay 2012-02-02 15:50:05 -08:00
platform.c drivercore: Output common devicetree information in uevent 2012-02-01 14:26:30 -07:00
soc.c drivers/base: fix compiler warning in SoC export driver - idr should be ida 2012-04-09 14:54:22 -07:00
sw_sync.c sw_sync: convert to new value_str debug ops 2013-03-04 12:47:44 -08:00
sync.c sync: Fix a race condition between release_obj and print_obj 2013-12-09 16:11:59 -08:00
sys.c drivers: Resurrect sysdev 2013-02-25 11:29:18 -08:00
syscore.c
topology.c cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem 2011-12-21 14:29:42 -08:00
transport_class.c