binder: don't detect sender/target during buffer cleanup
When freeing txn buffers, binder_transaction_buffer_release() attempts to detect whether the current context is the target by comparing current->group_leader to proc->tsk. This is an unreliable test. Instead explicitly pass an 'is_failure' boolean. Detecting the sender was being used as a way to tell if the transaction failed to be sent. When cleaning up after failing to send a transaction, there is no need to close the fds associated with a BINDER_TYPE_FDA object. Now 'is_failure' can be used to accurately detect this case. Fixes: 44d8047f ("binder: use standard functions to allocate fds") Cc: stable <stable@vger.kernel.org> Acked-by:Christian Brauner <christian.brauner@ubuntu.com> Signed-off-by:
Todd Kjos <tkjos@google.com> Link: https://lore.kernel.org/r/20211015233811.3532235-1-tkjos@google.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
-
mentioned in commit dbc772be
-
mentioned in commit c79caa0a
-
mentioned in commit c3c739b8
-
mentioned in commit 1dd34503
-
mentioned in commit b38ea172
-
mentioned in commit ea52b4f9
-
mentioned in commit 3d8c36b6
-
mentioned in commit 45ab20cc
-
mentioned in commit e28eaaec
-
mentioned in commit f8fb7751
-
mentioned in commit 66cba626
-
mentioned in commit 99e26f73
-
mentioned in commit bf55ddce
-
mentioned in commit af53c0c4
-
mentioned in commit a67c5f9a
-
mentioned in commit 2ce28090
-
mentioned in commit c1a4ea40
-
mentioned in commit 92394544
-
mentioned in commit 828a6eb3
-
mentioned in commit 64319d4b
-
mentioned in commit 20153712
-
mentioned in commit 9caa51de
-
mentioned in commit 913110b7
Please sign in to comment