Re: [PATCH v4 1/6] rust_binder: avoid allocating under node_refs for freeze listeners

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.rust-for-linux,org.kernel.vger.linux-kernel
Message-ID <2026071755-covenant-shining-6910@gregkh>
On Tue, Jul 07, 2026 at 10:28:51AM +0000, Alice Ryhl wrote:
> The node_refs mutex needs to be changed to a spinlock, so in preparation
> for that, update freeze.rs to avoid allocating under the node_refs lock.
> This is done by adding a retry loop so that if add_freeze_listener()
> requires reallocating the KVVec<_> of freeze listeners, the caller will
> allocate a larger vector and retry.
> 
> Analogously, the remove_freeze_listener() function is updated to return
> the empty KVVec<_> when it is no longer needed, to avoid calling
> kvfree() under the node_refs lock.
> 
> Reviewed-by: Matthew Maurer <[email protected]>
> Signed-off-by: Alice Ryhl <[email protected]>
> ---
>  drivers/android/binder/freeze.rs | 65 +++++++++++++++++++++++++++-------------
>  drivers/android/binder/node.rs   | 41 +++++++++++++------------
>  2 files changed, 64 insertions(+), 42 deletions(-)
> 

This doesn't apply against my tree now, given all of the binder patches
now added?  Can you rebase against char-misc-testing and resend?

thanks,

greg k-h
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.