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 | <2026071704-acorn-backstage-e0ba@gregkh> |
On Fri, Jul 17, 2026 at 03:48:07PM +0200, Alice Ryhl wrote: > On Fri, Jul 17, 2026 at 3:20 PM Greg Kroah-Hartman > <[email protected]> wrote: > > > > 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? > > I believe this is already in char-misc-next as commit b9d17aa74ddd > ("rust_binder: avoid allocating under node_refs for freeze > listeners"). Ok, sorry about that. I've now gone through all pending patches that I saw on my side for the binder code. There were 2 that needs review from you: https://lore.kernel.org/r/[email protected] https://lore.kernel.org/r/[email protected] and then there's the ratelimit patches outstanding too. If I've missed anything else, please resend. thanks, greg k-h