aboutsummaryrefslogtreecommitdiff
path: root/net/unix/garbage.c
diff options
context:
space:
mode:
authorIngo Molnar <[email protected]>2015-04-16 12:38:30 +0200
committerIngo Molnar <[email protected]>2015-04-18 13:31:26 +0200
commit0c99241c93b8060441f3c8434848e54b5338f922 (patch)
tree8e1182be161578cf64af32a3a8e91b2b1d17c4aa /net/unix/garbage.c
parent78d504bcd769cc496f63b626f507039eab2316b7 (diff)
perf/x86/intel/pt: Fix and clean up error handling in pt_event_add()
Dan Carpenter reported that pt_event_add() has buggy error handling logic: it returns 0 instead of -EBUSY when it fails to start a newly added event. Furthermore, the control flow in this function is messy, with cleanup labels mixed with direct returns. Fix the bug and clean up the code by converting it to a straight fast path for the regular non-failing case, plus a clear sequence of cascading goto labels to do all cleanup. NOTE: I materially changed the existing clean up logic in the pt_event_start() failure case to use the direct perf_aux_output_end() path, not pt_event_del(), because perf_aux_output_end() is enough here. Reported-by: Dan Carpenter <[email protected]> Acked-by: Alexander Shishkin <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/unix/garbage.c')
0 files changed, 0 insertions, 0 deletions