android_kernel_lge_bullhead/kernel
Steven Rostedt (VMware) 8c088f6cad tracing: Fix possible double free on failure of allocating trace buffer
Jing Xia and Chunyan Zhang reported that on failing to allocate part of the
tracing buffer, memory is freed, but the pointers that point to them are not
initialized back to NULL, and later paths may try to free the freed memory
again. Jing and Chunyan fixed one of the locations that does this, but
missed a spot.

Link: http://lkml.kernel.org/r/20171226071253.8968-1-chunyan.zhang@spreadtrum.com

Change-Id: I4fe8bc34cf545fa9f43aba8bd1c28eb0f567fe29
Cc: stable@vger.kernel.org
Fixes: 737223fbca ("tracing: Consolidate buffer allocation code")
Reported-by: Jing Xia <jing.xia@spreadtrum.com>
Reported-by: Chunyan Zhang <chunyan.zhang@spreadtrum.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2020-07-11 12:21:19 +02:00
..
cpu idle: Implement a per-cpu idle-polling mode 2014-11-12 22:49:15 -08:00
debug This is the 3.10.73 stable release 2015-05-01 13:49:45 -07:00
events perf/core: Drop kernel samples even though :u is specified 2019-08-26 15:24:05 +02:00
gcov
irq This is the 3.10.99 stable release 2018-01-25 17:22:39 -07:00
power This is the 3.10.105 stable release 2018-01-25 17:45:32 -07:00
sched sched/cputime: Fix invalid gtime in proc 2019-08-26 16:04:30 +02:00
time This is the 3.10.107 stable release 2018-01-25 17:57:41 -07:00
trace tracing: Fix possible double free on failure of allocating trace buffer 2020-07-11 12:21:19 +02:00
.gitignore kernel/hz.bc: ignore. 2013-04-22 07:09:06 -07:00
Kconfig.freezer
Kconfig.hz kernel: Disable SCHED_HRTICK 2019-08-26 15:23:09 +02:00
Kconfig.locks printk: Make the console flush configurable in hotplug path 2014-11-18 19:16:25 -07:00
Kconfig.preempt
Makefile Remove GENERIC_HARDIRQ config option 2014-02-07 13:49:47 -08:00
acct.c fs: Fix hang with BSD accounting on frozen filesystem 2013-05-04 14:57:58 -04:00
async.c async: rename and redefine async_func_ptr 2013-03-12 13:59:14 -07:00
audit.c CAPABILITIES: remove undefined caps from all processes 2014-09-17 09:03:57 -07:00
audit.h audit: fix mq_open and mq_unlink to add the MQ root as a hidden parent audit_names record 2013-12-04 10:57:03 -08:00
audit_tree.c audit: keep inode pinned 2014-11-21 09:22:52 -08:00
audit_watch.c
auditfilter.c audit: Fix compilation issue 2013-09-10 22:37:36 -06:00
auditsc.c auditsc: audit_krule mask accesses need bounds checking 2014-06-16 13:42:53 -07:00
backtracetest.c
bounds.c
capability.c CAPABILITIES: remove undefined caps from all processes 2014-09-17 09:03:57 -07:00
cgroup.c move d_rcu from overlapping d_child to overlapping d_alias 2018-11-11 23:36:22 +01:00
cgroup_freezer.c
compat.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2013-05-01 07:21:43 -07:00
configs.c proc: Supply PDE attribute setting accessor functions 2013-05-01 17:29:18 -04:00
context_tracking.c Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-06-20 08:18:35 -10:00
cpu.c This is the 3.10.106 stable release 2018-01-25 17:54:29 -07:00
cpu_pm.c cpu_pm: Add level to the cluster pm notification 2015-01-07 22:31:58 -08:00
cpuset.c cpuset: Make cpusets restore on hotplug 2015-06-19 13:59:27 -07:00
crash_dump.c
cred.c
delayacct.c
dma.c
elfcore.c
exec_domain.c
exit.c kernel: Only expose su when daemon is running 2018-01-08 00:09:54 -06:00
extable.c asmlinkage: Make main_extable_sort_needed visible 2019-08-26 14:20:50 +02:00
fork.c mm: allow drivers to prevent new writable mappings 2019-11-01 14:15:19 +01:00
freezer.c This is the 3.10.67 stable release 2015-05-01 13:34:57 -07:00
futex.c Android 8.1.0 Release 0.81 (OPM6.171019.030.E1,bullhead) 2018-07-02 16:20:07 -07:00
futex_compat.c ptrace: use fsuid, fsgid, effective creds for fs access checks 2016-02-25 11:57:47 -08:00
groups.c userns: Don't allow setgroups until a gid mapping has been setablished 2015-01-08 09:58:16 -08:00
hrtimer.c hrtimer: Allow concurrent hrtimer_start() for self restarting timers 2015-08-21 23:27:45 -07:00
hung_task.c
irq_work.c irq_work: register irq_work_cpu_notify in early init 2014-12-22 14:30:12 +05:30
itimer.c
jump_label.c
kallsyms.c kernel: kallsyms: memory override issue, need check destination buffer length 2013-04-15 15:17:26 +09:30
kcmp.c ptrace: use fsuid, fsgid, effective creds for fs access checks 2016-02-25 11:57:47 -08:00
kexec.c PCI: Disable Bus Master only on kexec reboot 2013-12-20 07:45:08 -08:00
kmod.c arch: Mass conversion of smp_mb__*() 2014-08-15 11:45:28 -07:00
kprobes.c kprobes: Fix to free gone and unused optprobes 2013-05-28 10:37:59 +02:00
ksysfs.c
kthread.c kthread: Fix the race condition when kthread is parked 2015-06-19 15:54:09 -07:00
latencytop.c
lglock.c
lockdep.c lockdep: remove task argument from debug_check_no_locks_held 2013-07-01 15:38:03 -07:00
lockdep_internals.h
lockdep_proc.c
lockdep_states.h
modsign_certificate.S CONFIG_SYMBOL_PREFIX: cleanup. 2013-03-15 15:09:43 +10:30
modsign_pubkey.c
module-internal.h
module.c This is the 3.10.103 stable release 2018-01-25 17:26:32 -07:00
module_signing.c
mutex-debug.c
mutex-debug.h
mutex.c mutex: Add a delay into the SPIN_ON_OWNER wait loop. 2015-08-11 23:00:58 +00:00
mutex.h
notifier.c
nsproxy.c proc: Split the namespace stuff out into linux/proc_ns.h 2013-05-01 17:29:39 -04:00
padata.c padata: avoid race in reordering 2017-06-20 14:04:40 +02:00
panic.c asmlinkage Make __stack_chk_failed and memcmp visible 2019-08-26 17:06:38 +02:00
params.c params: Fix potential memory leak in add_sysfs_param() 2013-03-18 11:40:21 +00:00
pid.c BACKPORT: FROMLIST: pids: make task_tgid_nr_ns() safe 2017-09-01 14:11:07 -07:00
pid_namespace.c pid_namespace: pidns_get() should check task_active_pid_ns() != NULL 2014-04-26 17:15:34 -07:00
posix-cpu-timers.c posix_timers: Fix pre-condition to stop the tick on full dynticks 2013-04-22 19:59:25 +02:00
posix-timers.c posix-timers: Fix stack info leak in timer_create() 2014-11-14 08:48:00 -08:00
printk.c This is the 3.10.107 stable release 2018-01-25 17:57:41 -07:00
profile.c profile: Fix CPU hotplug callback registration 2014-07-01 13:52:28 -07:00
ptrace.c This is the 3.10.77 stable release 2018-01-25 16:44:47 -07:00
range.c range: Do not add new blank slot with add_range_with_merge 2013-06-18 11:32:10 -05:00
rcu.h
rcupdate.c
rcutiny.c
rcutiny_plugin.h
rcutorture.c
rcutree.c Revert "rcu: Make RCU_FAST_NO_HZ take advantage of numbered callbacks" 2015-09-11 00:33:57 -07:00
rcutree.h Revert "rcu: Make RCU_FAST_NO_HZ take advantage of numbered callbacks" 2015-09-11 00:33:57 -07:00
rcutree_plugin.h This is the 3.10.105 stable release 2018-01-25 17:45:32 -07:00
rcutree_trace.c Revert "rcu: Make RCU_FAST_NO_HZ take advantage of numbered callbacks" 2015-09-11 00:33:57 -07:00
relay.c Merge branch 'for-3.10/core' of git://git.kernel.dk/linux-block 2013-05-08 10:13:35 -07:00
res_counter.c
resource.c This is the 3.10.99 stable release 2018-01-25 17:22:39 -07:00
rtmutex-debug.c
rtmutex-debug.h rtmutex: Handle deadlock detection smarter 2014-07-17 15:58:04 -07:00
rtmutex-tester.c locking/rtmutex/tester: Set correct permissions on sysfs files 2013-04-10 14:48:37 +02:00
rtmutex.c locking/rtmutex: Prevent dequeue vs. unlock race 2017-06-08 00:46:48 +02:00
rtmutex.h rtmutex: Handle deadlock detection smarter 2014-07-17 15:58:04 -07:00
rtmutex_common.h
rwsem.c Revert "rw_semaphore: remove up/down_read_non_owner" 2013-03-23 15:53:52 -07:00
seccomp.c seccomp: always propagate NO_NEW_PRIVS on tsync 2017-03-30 18:18:33 +00:00
semaphore.c semaphore: use `bool' type for semaphore_waiter's up 2013-04-30 17:04:08 -07:00
signal.c This is the 3.10.103 stable release 2018-01-25 17:26:32 -07:00
smp.c This is the 3.10.67 stable release 2015-05-01 13:34:57 -07:00
smpboot.c smpboot: Add missing get_online_cpus() in smpboot_register_percpu_thread() 2015-02-11 14:48:17 +08:00
smpboot.h
softirq.c This is the 3.10.79 stable release 2018-01-25 16:45:15 -07:00
spinlock.c
srcu.c
stacktrace.c debugging: keep track of page owners 2014-03-28 13:33:08 -07:00
stop_machine.c stop_machine: Mark per cpu stopper enabled early 2013-02-26 22:25:17 +01:00
sys.c prctl: make PR_SET_TIMERSLACK_PID pid namespace aware 2015-07-21 16:06:29 -07:00
sys_ni.c shm: add memfd_create() syscall 2019-11-01 14:14:08 +01:00
sysctl.c This is the 3.10.107 stable release 2018-01-25 17:57:41 -07:00
sysctl_binary.c sysctl: add cold_boot sysctl entry 2013-09-05 14:51:16 -07:00
task_work.c
taskstats.c
test_kprobes.c kernel/: rename random32() to prandom_u32() 2013-04-29 18:28:42 -07:00
time.c time: settimeofday: Validate the values of tv from user 2015-01-29 17:40:56 -08:00
timeconst.bc kernel: Replace timeconst.pl with a bc script 2013-02-16 23:17:25 +01:00
timer.c This is the 3.10.105 stable release 2018-01-25 17:45:32 -07:00
tracepoint.c tracepoint: Do not waste memory on mods with no tracepoints 2014-05-30 21:52:11 -07:00
tsacct.c
uid16.c groups: Consolidate the setgroups permission checks 2015-01-08 09:58:16 -08:00
up.c
user-return-notifier.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
user.c userns: Add a knob to disable setgroups on a per user namespace basis 2015-01-08 09:58:16 -08:00
user_namespace.c UPSTREAM: capabilities: ambient capabilities 2016-12-05 12:10:41 -05:00
utsname.c proc: Split the namespace stuff out into linux/proc_ns.h 2013-05-01 17:29:39 -04:00
utsname_sysctl.c kernel/utsname_sysctl.c: put get/get_uts() into CONFIG_PROC_SYSCTL code block 2013-02-27 19:10:22 -08:00
wait.c sched: add bit_wait_io for 3.18 ext4 backport 2015-06-15 15:09:46 -07:00
watchdog.c hardlockup: detect hard lockups without NMIs using secondary cpus 2013-07-01 14:16:17 -07:00
workqueue.c workqueue: allow rescuer thread to do more work. 2019-08-26 16:12:57 +02:00
workqueue_internal.h workqueue: include workqueue info when printing debug dump of a worker task 2013-04-30 17:04:02 -07:00