• Peter Zijlstra's avatar
    perf: Collapse and fix event_function_call() users · fae3fde6
    Peter Zijlstra authored
    There is one common bug left in all the event_function_call() users,
    between loading ctx->task and getting to the remote_function(),
    ctx->task can already have been changed.
    
    Therefore we need to double check and retry if ctx->task != current.
    
    Insert another trampoline specific to event_function_call() that
    checks for this and further validates state. This also allows getting
    rid of the active/inactive functions.
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Vince Weaver <vincent.weaver@maine.edu>
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    fae3fde6
hw_breakpoint.c 15.5 KB