]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rust_binder: avoid mem::take on delivered_deaths
authorAlice Ryhl <aliceryhl@google.com>
Tue, 11 Nov 2025 14:23:33 +0000 (14:23 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Jan 2026 11:57:05 +0000 (12:57 +0100)
commitbee1f36801dba1d079c9eaf9a7d1263ea90cbaff
tree22087a60a268ec650e23b4cff7d25d04aea6d3e6
parent505e8c7f6ca1c3e8f4caa2bc598f47fa3ac664e3
rust_binder: avoid mem::take on delivered_deaths

commit 6c37bebd8c926ad01ef157c0d123633a203e5c0d upstream.

Similar to the previous commit, List::remove is used on
delivered_deaths, so do not use mem::take on it as that may result in
violations of the List::remove safety requirements.

I don't think this particular case can be triggered because it requires
fd close to run in parallel with an ioctl on the same fd. But let's not
tempt fate.

Cc: stable@vger.kernel.org
Fixes: eafedbc7c050 ("rust_binder: add Rust Binder driver")
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Link: https://patch.msgid.link/20251111-binder-fix-list-remove-v1-2-8ed14a0da63d@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/android/binder/process.rs