binder: Remove bogus warning on failed same-process transaction
PATCH 1/1 binder: Remove bogus warning on failed same-process transaction
While binder transactions with the same binder_proc as sender and recipient are forbidden, transactions with the same task_struct as sender and recipient are possible (even though currently there is a weird check in binder_transaction() that rejects them in the target==0 case). Therefore, task_struct identities can't be used to distinguish whether the caller is running in the context of the sender or the recipient.
Since I see no easy way to make this WARN_ON() useful and correct, let's just remove it.
--- drivers/android/binder.c | 2 -- 1 file changed, 2 deletions(-)
drivers/android/binder.c +0 -2
@@ -2344,8 +2344,6 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,* file is done when the transaction is torn * down. */ -WARN_ON (failed_at && - proc->tsk == current->group_leader); }break ;case BINDER_TYPE_PTR :/*
base-commit: 47ec5303d73ea344e84f46660fff693c57641386
Signature · 1 line
2.28.0.163.g6104cc2f0b6-goog
Quoted 8 lines · Jann Horn
While binder transactions with the same
binder_procas sender and recipient are forbidden, transactions with the sametask_structas sender and recipient are possible (even though currently there is a weird check inbinder_transaction()that rejects them in the target==0 case). Therefore,task_structidentities can't be used to distinguish whether the caller is running in the context of the sender or the recipient.
Quoted 6 lines
Since I see no easy way to make this
WARN_ON()useful and correct, let's just remove it.Fixes 44d8047f1d87 ("binder: use standard functions to allocate fds")Reported-by [email protected]Signed-off-by Jann Horn <[email protected]>
Quoted 22 lines
--- drivers/android/binder.c | 2 -- 1 file changed, 2 deletions(-)drivers/android/binder.c +0
-2@@ -2344,8 +2344,6 @@ static void binder_transaction_buffer_release(struct binder_proc *proc,* file is done when the transaction is torn * down. */ -WARN_ON (failed_at && - proc->tsk == current->group_leader); }break ;case BINDER_TYPE_PTR :/* base-commit:
47ec5303d73ea344e84f46660fff693c57641386--
2.28.0.163.g6104cc2f0b6-goog
Quoted 7 lines · Jann Horn
While binder transactions with the same
binder_procas sender and recipient are forbidden, transactions with the sametask_structas sender and recipient are possible (even though currently there is a weird check inbinder_transaction()that rejects them in the target==0 case). Therefore,task_structidentities can't be used to distinguish whether the caller is running in the context of the sender or the recipient.
Quoted 7 lines
Since I see no easy way to make this
WARN_ON()useful and correct, let's just remove it.Fixes 44d8047f1d87 ("binder: use standard functions to allocate fds")Reported-by [email protected]Signed-off-by Jann Horn <[email protected]>---
Thanks!
Christian