linux/drivers/staging/android/ion
Mitchel Humpherys 95e53ddd82 staging: ion: always initialize the free list parameters
Currently we initialize the heap free_lock and free list size in
ion_heap_init_deferred_free, which is only called when the
ION_HEAP_FLAG_DEFER_FREE heap flag is given.  However, the lock and size
are used in the shrinker path as well as the deferred free path, and we
can register a shrinker *without* enabling deferred freeing.  So, if a
heap provides a shrinker but *doesn't* set the DEFER_FREE flag we will
use these parameters uninitialized (resulting in a spinlock bug and
broken shrinker accounting).

Fix these problems by initializing the free list parameters directly in
ion_device_add_heap, which is always called no matter which heap
features are being used.

Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 16:16:00 -08:00
..
tegra staging: android: ion: Deletion of unnecessary checks before two function calls 2014-11-26 13:42:53 -08:00
Kconfig staging: ion: vm_insert_pfn and zap_page_range rely on CONFIG_MMU 2014-07-30 16:36:27 -07:00
Makefile ion: Add dummy driver for testing 2014-01-09 21:16:40 -08:00
compat_ion.c android: ->f_op is never NULL 2014-10-09 02:39:12 -04:00
compat_ion.h ion: add compat_ioctl 2013-12-14 08:57:18 -08:00
ion.c staging: ion: always initialize the free list parameters 2015-01-17 16:16:00 -08:00
ion.h Staging: android: ion: fix typos in comments 2014-11-03 16:22:50 -08:00
ion_carveout_heap.c staging: android: ion: Remove redundant return of void function 2014-08-16 12:23:23 -07:00
ion_chunk_heap.c staging: android: ion: Remove redundant return of void function 2014-08-16 12:23:23 -07:00
ion_cma_heap.c staging: ion: ion_cma_heap: remove ion_cma_get_sgtable 2015-01-17 16:14:16 -08:00
ion_dummy_driver.c staging: android: ion: Deletion of unnecessary checks before two function calls 2014-11-26 13:42:53 -08:00
ion_heap.c staging: ion: always initialize the free list parameters 2015-01-17 16:16:00 -08:00
ion_page_pool.c staging: android: Assign bool to true 2014-10-23 12:38:32 +08:00
ion_priv.h Staging: android: ion: fix typos in comments 2014-11-03 16:22:50 -08:00
ion_system_heap.c staging: android: ion: Remove redundant return of void function 2014-08-16 12:23:23 -07:00
ion_test.c ion_test: Add compat_ioctl support (v2) 2013-12-19 16:10:25 -08:00