• P
    perf_events: Fix races in group composition · 8a49542c
    Peter Zijlstra 提交于
    Group siblings don't pin each-other or the parent, so when we destroy
    events we must make sure to clean up all cross referencing pointers.
    
    In particular, for destruction of a group leader we must be able to
    find all its siblings and remove their reference to it.
    
    This means that detaching an event from its context must not detach it
    from the group, otherwise we can end up failing to clear all pointers.
    
    Solve this by clearly separating the attachment to a context and
    attachment to a group, and keep the group composed until we destroy
    the events.
    Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
    LKML-Reference: <new-submission>
    Signed-off-by: NIngo Molnar <mingo@elte.hu>
    8a49542c
perf_event.h 26.9 KB