• A
    perf session: Invalidate last_match when removing threads from rb_tree · 70597f21
    Arnaldo Carvalho de Melo 提交于
    If we receive two PERF_RECORD_EXIT for the same thread, we can end up
    reusing session->last_match and trying to remove the thread twice from
    the rb_tree, causing a segfault, so invalidade last_match in
    perf_session__remove_thread.
    
    Receiving two PERF_RECORD_EXIT for the same thread is a bug, but its a
    harmless one if we make the tool more robust, like this patch does.
    
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Mike Galbraith <efault@gmx.de>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Stephane Eranian <eranian@google.com>
    LKML-Reference: <new-submission>
    Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
    70597f21
session.c 22.7 KB