From: Jann Horn <jannh@google.com> To: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>, "Arve Hjønnevåg" <arve@android.com>, "Todd Kjos" <tkjos@android.com>, "Martijn Coenen" <maco@android.com>, "Joel Fernandes" <joel@joelfernandes.org>, "Christian Brauner" <christian@brauner.io>, "Hridya Valsaraju" <hridya@google.com>, "Suren Baghdasaryan" <surenb@google.com> Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] binder: Remove bogus warning on failed same-process transaction Date: Thu, 6 Aug 2020 18:53:59 +0200 [thread overview] Message-ID: <20200806165359.2381483-1-jannh@google.com> (raw) 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
WARNING: multiple messages have this Message-ID (diff)
From: Jann Horn <jannh@google.com> To: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>, "Arve Hjønnevåg" <arve@android.com>, "Todd Kjos" <tkjos@android.com>, "Martijn Coenen" <maco@android.com>, "Joel Fernandes" <joel@joelfernandes.org>, "Christian Brauner" <christian@brauner.io>, "Hridya Valsaraju" <hridya@google.com>, "Suren Baghdasaryan" <surenb@google.com> Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] binder: Remove bogus warning on failed same-process transaction Date: Thu, 6 Aug 2020 18:53:59 +0200 [thread overview] Message-ID: <20200806165359.2381483-1-jannh@google.com> (raw) 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 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next reply other threads:[~2020-08-06 16:54 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-06 16:53 Jann Horn [this message] 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-06 16:58 ` Todd Kjos 2020-08-07 14:06 ` Christian Brauner 2020-08-07 14:06 ` Christian Brauner
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200806165359.2381483-1-jannh@google.com \ --to=jannh@google.com \ --cc=arve@android.com \ --cc=christian@brauner.io \ --cc=devel@driverdev.osuosl.org \ --cc=gregkh@linuxfoundation.org \ --cc=hridya@google.com \ --cc=joel@joelfernandes.org \ --cc=linux-kernel@vger.kernel.org \ --cc=maco@android.com \ --cc=surenb@google.com \ --cc=tkjos@android.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.