From: Mitchel Humpherys Date: Fri, 9 Jan 2015 01:24:27 +0000 (-0800) Subject: staging: ion: always initialize the free list parameters X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~83^2~285 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95e53ddd8240bad37df985a9ae2d2a07f49e6bf1;p=pandora-kernel.git 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 Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed