Repository navigation
Commit 07d1db1
binder: don't detect sender/target during buffer cleanup
commit 32e9f56 upstream.
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: 44d8047 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 42681b9 commit 07d1db1
1 file changed
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2254 | 2254 | | |
2255 | 2255 | | |
2256 | 2256 | | |
2257 | | - | |
| 2257 | + | |
2258 | 2258 | | |
2259 | 2259 | | |
2260 | 2260 | | |
| |||
2340 | 2340 | | |
2341 | 2341 | | |
2342 | 2342 | | |
2343 | | - | |
| 2343 | + | |
2344 | 2344 | | |
2345 | | - | |
2346 | 2345 | | |
2347 | 2346 | | |
2348 | 2347 | | |
| |||
3544 | 3543 | | |
3545 | 3544 | | |
3546 | 3545 | | |
| 3546 | + | |
3547 | 3547 | | |
3548 | 3548 | | |
3549 | 3549 | | |
| |||
3553 | 3553 | | |
3554 | 3554 | | |
3555 | 3555 | | |
3556 | | - | |
| 3556 | + | |
3557 | 3557 | | |
3558 | 3558 | | |
3559 | 3559 | | |
| |||
3581 | 3581 | | |
3582 | 3582 | | |
3583 | 3583 | | |
3584 | | - | |
| 3584 | + | |
3585 | 3585 | | |
3586 | 3586 | | |
3587 | 3587 | | |
| |||
3782 | 3782 | | |
3783 | 3783 | | |
3784 | 3784 | | |
3785 | | - | |
| 3785 | + | |
3786 | 3786 | | |
3787 | 3787 | | |
3788 | 3788 | | |
| |||
4470 | 4470 | | |
4471 | 4471 | | |
4472 | 4472 | | |
4473 | | - | |
| 4473 | + | |
4474 | 4474 | | |
4475 | 4475 | | |
4476 | 4476 | | |
| |||
0 commit comments