Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9e16c23 authored by Steven Rostedt (VMware)'s avatar Steven Rostedt (VMware) Committed by Greg Kroah-Hartman
Browse files

tracing: Fix possible double free on failure of allocating trace buffer

commit 4397f04575c44e1440ec2e49b6302785c95fd2f8 upstream.

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



Fixes: 737223fb ("tracing: Consolidate buffer allocation code")
Reported-by: default avatarJing Xia <jing.xia@spreadtrum.com>
Reported-by: default avatarChunyan Zhang <chunyan.zhang@spreadtrum.com>
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 973b6456
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment