• Todd Kjos's avatar
    binder: use inner lock to sync work dq and node counts · ed29721e
    Todd Kjos authored
    For correct behavior we need to hold the inner lock when
    dequeuing and processing node work in binder_thread_read.
    We now hold the inner lock when we enter the switch statement
    and release it after processing anything that might be
    affected by other threads.
    
    We also need to hold the inner lock to protect the node
    weak/strong ref tracking fields as long as node->proc
    is non-NULL (if it is NULL then we are guaranteed that
    we don't have any node work queued).
    
    This means that other functions that manipulate these fields
    must hold the inner lock. Refactored these functions to use
    the inner lock.
    Signed-off-by: default avatarTodd Kjos <tkjos@google.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    ed29721e
binder.c 137 KB