You need to sign in or sign up before continuing.
  • T
    binder: avoid race conditions when enqueuing txn · ccae6f67
    Todd Kjos 提交于
    Currently, the transaction complete work item is queued
    after the transaction. This means that it is possible
    for the transaction to be handled and a reply to be
    enqueued in the current thread before the transaction
    complete is enqueued, which violates the protocol
    with userspace who may not expect the transaction
    complete. Fixed by always enqueing the transaction
    complete first.
    
    Also, once the transaction is enqueued, it is unsafe
    to access since it might be freed. Currently,
    t->flags is accessed to determine whether a sync
    wake is needed. Changed to access tr->flags
    instead.
    Signed-off-by: NTodd Kjos <tkjos@google.com>
    Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    ccae6f67
binder.c 107.4 KB