mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] binder: Remove bogus warning on failed same-process transaction
@ 2020-08-06 16:53 Jann Horn
  2020-08-06 16:58 ` Todd Kjos
  2020-08-07 14:06 ` Christian Brauner
  0 siblings, 2 replies; 3+ messages in thread
From: Jann Horn @ 2020-08-06 16:53 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Arve Hjønnevåg, Todd Kjos,
	Martijn Coenen, Joel Fernandes, Christian Brauner,
	Hridya Valsaraju, Suren Baghdasaryan
  Cc: devel, linux-kernel

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.

Fixes: 44d8047f1d87 ("binder: use standard functions to allocate fds")
Reported-by: syzbot+e113a0b970b7b3f394ba@syzkaller.appspotmail.com
Signed-off-by: Jann Horn <jannh@google.com>
---
 drivers/android/binder.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index f936530a19b0..5b0376344dbe 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-07 14:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-06 16:53 [PATCH] binder: Remove bogus warning on failed same-process transaction Jann Horn
2020-08-06 16:58 ` Todd Kjos
2020-08-07 14:06 ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®