From: Arnaldo Carvalho de Melo Date: Mon, 2 Aug 2010 21:59:28 +0000 (-0300) Subject: perf session: Invalidate last_match when removing threads from rb_tree X-Git-Tag: v2.6.36-rc1~532^2~3^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70597f21f128b7dd6a2490078bea99d704b6f8c3;p=pandora-kernel.git perf session: Invalidate last_match when removing threads from rb_tree 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 Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Stephane Eranian LKML-Reference: Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed