linux/drivers/staging/android
Alistair Strachan f364a04fb4 staging: android: sync: Fix memory corruption in sync_timeline_signal().
[ Upstream commit 8e43c9c75f ]

The android_fence_release() function checks for active sync points
by calling list_empty() on the list head embedded on the sync
point. However, it is only valid to use list_empty() on nodes that
have been initialized with INIT_LIST_HEAD() or list_del_init().

Because the list entry has likely been removed from the active list
by sync_timeline_signal(), there is a good chance that this
WARN_ON_ONCE() will be hit due to dangling pointers pointing at
freed memory (even though the sync drivers did nothing wrong)
and memory corruption will ensue as the list entry is removed for
a second time, corrupting the active list.

This problem can be reproduced quite easily with CONFIG_DEBUG_LIST=y
and fences with more than one sync point.

Signed-off-by: Alistair Strachan <alistair.strachan@imgtec.com>
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Colin Cross <ccross@google.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
History 2015-05-17 19:11:52 -04:00
..
ion Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-10-13 11:28:42 +02:00
trace android: convert sync to fence api, v6 2014-07-08 13:28:26 -07:00
uapi staging: android: fix attribute as suggested by checkpatch 2014-08-17 09:50:44 -07:00
alarm-dev.c staging: alarm-dev: Set the license to GPL 2014-06-20 08:28:01 -07:00
android_alarm.h staging: android: Split uapi out of android_alarm.h 2014-02-18 11:03:28 -08:00
ashmem.c ashmem: use vfs_llseek() 2014-10-09 02:39:04 -04:00
ashmem.h staging: android: Split uapi out of ashmem.h 2014-02-18 11:03:28 -08:00
binder.c staging: binder: fix coding style issues 2014-09-08 13:29:01 -07:00
binder.h staging: binder: Support concurrent 32 bit and 64 bit processes. 2014-02-24 16:29:40 -08:00
binder_trace.h staging: binder: Support concurrent 32 bit and 64 bit processes. 2014-02-24 16:29:40 -08:00
Kconfig Staging driver patches for 3.17-rc1 2014-08-04 18:36:12 -07:00
logger.c staging: android: logger: Fix log corruption regression 2014-10-28 18:24:30 -04:00
logger.h staging: android: logger: use kuid_t instead of uid_t 2013-05-16 15:37:51 -07:00
lowmemorykiller.c staging: android: lowmemorykiller: neglect swap cached pages in other_file 2014-02-27 14:51:27 -08:00
Makefile android: convert sync to fence api, v6 2014-07-08 13:28:26 -07:00
sw_sync.c staging: android: sw_sync: checkpatch fixes 2014-09-19 16:35:53 -07:00
sw_sync.h staging: android: sw_sync: checkpatch fixes 2014-09-19 16:35:53 -07:00
sync.c staging: android: sync: Fix memory corruption in sync_timeline_signal(). 2015-05-17 19:11:52 -04:00
sync.h staging : android : sync : get_unused_fd 2014-09-28 22:03:57 -04:00
sync_debug.c staging: android: Cleanup style issues 2014-07-12 13:24:19 -07:00
timed_gpio.c Staging: android: timed_gpio.c: improved logic of gpio_get_time() 2014-08-01 14:40:30 -07:00
timed_gpio.h Staging: android: timed_gpio: Removed spaces before tabs 2012-02-29 15:52:52 -08:00
timed_output.c Staging: android: timed_output.c: use kstrtoint() instead of sscanf() 2014-07-30 17:17:02 -07:00
timed_output.h staging: android: timed_output: fix a checkpatch warning 2014-02-11 12:27:30 -08:00
TODO drivers:staging:android Typos: fix some comments that have typos in them. 2012-02-08 16:47:50 -08:00