• F
    tracing/syscalls: fix missing release of tracing · ac99c58c
    Frederic Weisbecker 提交于
    Impact: fix 'stuck' syscall tracer
    
    The syscall tracer uses a refcounter to enable several users
    simultaneously.
    
    But the refcounter did not behave correctly and always restored
    its value to 0 after calling start_syscall_tracing(). Therefore,
    stop_syscall_tracing() couldn't release correctly the tasks from
    tracing.
    
    Also the tracer forgot to reset the buffer when it is released.
    
    Drop the pointless refcount decrement on start_syscall_tracing()
    and reset the buffer when we release the tracer.
    
    This fixes two reported issue:
    
    - when we switch from syscall tracer to another tracer, syscall
      tracing continued.
    
    - incorrect use of the refcount.
    Reported-by: NAndrew Morton <akpm@linux-foundation.org>
    Reported-by: NIngo Molnar <mingo@elte.hu>
    Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
    LKML-Reference: <1237151439-6755-1-git-send-email-fweisbec@gmail.com>
    Signed-off-by: NIngo Molnar <mingo@elte.hu>
    ac99c58c
trace_syscalls.c 5.1 KB