[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPhsuW4EiGUo=p=KYsu+kGWVFRoxEjF3Bq_32QvakQjCsAAjFQ@mail.gmail.com>
Date: Wed, 16 Jan 2019 10:57:49 -0800
From: Song Liu <liu.song.a23@...il.com>
To: open list <linux-kernel@...r.kernel.org>,
Jiri Olsa <jolsa@...nel.org>
Cc: acme@...nel.org
Subject: perf segfault in in ordered_events__free()
Hi,
We are debugging a segfault of perf in ordered_events__free().
Disassemble shows the segfault was caused by oe->buff == NULL
in the following line:
/*
* Current buffer might not have all the events allocated
* yet, we need to free only allocated ones ...
*/
list_del(&oe->buffer->list);
After poking around the code, I suspect it is caused by the following
condition in alloc_event():
} else if (oe->buffer) {
new = &oe->buffer->event[oe->buffer_idx];
if (++oe->buffer_idx == MAX_SAMPLE_BUFFER)
oe->buffer = NULL;
Does this theory make sense? If so, what would be the best fix?
Thanks in advance!
Song
Powered by blists - more mailing lists