On Tue, Jan 23, 2024 at 03:06:06PM +0000, Carlos Llamas wrote:
On Mon, Jan 22, 2024 at 03:58:17PM -0800, Greg Kroah-Hartman wrote:
5.4-stable review patch. If anyone has any objections, please let me know.
From: Martijn Coenen maco@android.com
[ Upstream commit 261e7818f06ec51e488e007f787ccd7e77272918 ]
The most common cause of the binder transaction buffer filling up is a client rapidly firing oneway transactions into a process, before it has a chance to handle them. Yet the root cause of this is often hard to debug, because either the system or the app will stop, and by that time binder debug information we dump in bugreports is no longer relevant.
This change warns as soon as a process dips below 80% of its oneway space (less than 100kB available in the configuration), when any one process is responsible for either more than 50 transactions, or more than 50% of the oneway space.
Signed-off-by: Martijn Coenen maco@android.com Acked-by: Todd Kjos tkjos@google.com Link: https://lore.kernel.org/r/20200821122544.1277051-1-maco@android.com Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org Stable-dep-of: c6d05e0762ab ("binder: fix unused alloc->free_async_space") Signed-off-by: Sasha Levin sashal@kernel.org
I think we should drop this patch from the 5.4 stable queue. I assume it was pulled in as a dependency of patch c6d05e0762ab ("binder: fix unused alloc->free_async_space"). However, I have instead fixed the conflicts for that backport here: https://lore.kernel.org/all/20240122235725.449688589@linuxfoundation.org/
I was not aware that this patch was being backported and now we have the following missing hunk in this v5.4 series:
diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c index abff1bafcc43..9b5c4d446efa 100644 --- a/drivers/android/binder_alloc.c +++ b/drivers/android/binder_alloc.c @@ -344,8 +344,7 @@ static bool debug_low_async_space_locked(struct binder_alloc *alloc, int pid) continue; if (!buffer->async_transaction) continue;
total_alloc_size += binder_alloc_buffer_size(alloc, buffer)
+ sizeof(struct binder_buffer);
total_alloc_size += binder_alloc_buffer_size(alloc, buffer); num_buffers++; }
Dropping this patch fixes this problem. After all it doesn't fix anything so we don't need it here.
Sorry for all the binder backporting mess.
I've dropped this now, thanks!
greg k-h