[PATCH -stable 4.1 2/2] perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race

2017-02-24 Thread Wang Nan
From: Peter Zijlstra [ Upstream commit 321027c1fe77f892f4ea07846aeae08cefbbb290 ] Di Shen reported a race between two concurrent sys_perf_event_open() calls where both try and move the same pre-existing software group into a hardware context. The problem is exactly that

[PATCH -stable 4.1 2/2] perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race

2017-02-24 Thread Wang Nan
From: Peter Zijlstra [ Upstream commit 321027c1fe77f892f4ea07846aeae08cefbbb290 ] Di Shen reported a race between two concurrent sys_perf_event_open() calls where both try and move the same pre-existing software group into a hardware context. The problem is exactly that described in commit: