• Oleg Nesterov's avatar
    uprobes: Introduce filter_chain() · 63633cbf
    Oleg Nesterov authored
    Add the new helper filter_chain(). Currently it is only placeholder,
    the comment explains what is should do. We will change it later to
    consult every consumer to decide whether we need to install the swbp.
    Until then it works as if any consumer returns true, this matches the
    current behavior.
    
    Change install_breakpoint() to call filter_chain() instead of checking
    uprobe->consumers != NULL. We obviously need this, and this equally
    closes the race with _unregister().
    
    Change remove_breakpoint() to call this helper too. Currently this is
    pointless because remove_breakpoint() is only called when the last
    consumer goes away, but we will change this.
    Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
    Acked-by: default avatarSrikar Dronamraju <srikar@linux.vnet.ibm.com>
    63633cbf
uprobes.c 39 KB