linux-stable/drivers/android
Qi Zheng ceb0f8cc98 binder: fix memory leak in binder_init()
commit adb9743d6a upstream.

In binder_init(), the destruction of binder_alloc_shrinker_init() is not
performed in the wrong path, which will cause memory leaks. So this commit
introduces binder_alloc_shrinker_exit() and calls it in the wrong path to
fix that.

Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Acked-by: Carlos Llamas <cmllamas@google.com>
Fixes: f2517eb76f ("android: binder: Add global lru shrinker to binder")
Cc: stable <stable@kernel.org>
Link: https://lore.kernel.org/r/20230625154937.64316-1-qi.zheng@linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-16 18:13:00 +02:00
..
Kconfig android: binder: Drop dependency on !M68K 2018-07-07 17:44:52 +02:00
Makefile android: binder: Add allocator selftest 2017-08-28 16:47:17 +02:00
binder.c binder: fix memory leak in binder_init() 2023-08-16 18:13:00 +02:00
binder_alloc.c binder: fix memory leak in binder_init() 2023-08-16 18:13:00 +02:00
binder_alloc.h binder: fix memory leak in binder_init() 2023-08-16 18:13:00 +02:00
binder_alloc_selftest.c android: binder: Add global lru shrinker to binder 2017-08-28 16:47:17 +02:00
binder_trace.h android: binder: Show extra_buffers_size in trace 2018-08-02 10:34:12 +02:00