Re: [PATCH] perf top: Fix a race in callchain handling

From: Peter Zijlstra
Date: Sat May 05 2012 - 14:23:00 EST


On Sun, 2012-05-06 at 00:23 +0900, Namhyung Kim wrote:
> + static struct callchain_cursor cursor;

This just begs to become another concurrency problem. If anybody manages
to call multiple hists__collapse_insert_entry() concurrently you're
again up some creek without no paddle.

Adding global state is never a good option when dealing with
concurrency.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/