diff options
| author | Alice Ryhl <aliceryhl@google.com> | 2026-09-03 11:36:03 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-09-16 19:33:40 +0100 |
| commit | 2a74ccd1bcc170e66525f34e9de8652b57e2cf3d (patch) | |
| tree | 1c2fcae7c8864a2bbeb61822238038a1acfecc5d /scripts/kernel-doc | |
| parent | 62479b6e5df82cbdf3c4145130928f233fae78fb (diff) | |
| download | linux-stable-2a74ccd1bcc170e66525f34e9de8652b57e2cf3d.tar.gz linux-stable-2a74ccd1bcc170e66525f34e9de8652b57e2cf3d.zip | |
rust_binder: reschedule node refcount update on thread exit
When a thread exits via BINDER_THREAD_EXIT, its pending work items are
cancelled. If a thread exits while holding a pending node refcount
increment (e.g. pushed as deferred work to that thread), the refcount
increment was previously dropped because Node::cancel() and
NodeWrapper::cancel() were no-ops.
Dropping the refcount update leaves the node's delivery state and count
state desynchronized, and userspace will not receive the notification,
which can cause the node to never be freed from the process's nodes tree
when all external references are dropped.
Fix this by implementing DeliverToRead::cancel() for Node and NodeWrapper
to move the pending refcount update to the process's work queue on thread
exit so another thread can deliver it to userspace.
Cc: stable <stable@kernel.org>
Fixes: eafedbc7c050 ("rust_binder: add Rust Binder driver")
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260903-binder-thread-exit-node-v1-1-be09ff14f6a4@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/kernel-doc')
0 files changed, 0 insertions, 0 deletions
