binderfs: add new binder devices to binder_devices
authorLi Li <dualli@google.com>
Wed, 18 Dec 2024 21:29:34 +0000 (13:29 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jan 2025 12:18:09 +0000 (13:18 +0100)
commit12d909cac1e1c4147cc3417fee804ee12fc6b984
tree4c78ab78b18b92761f6137547d25f3a3971ccdbb
parentb3b9b3cccb32a6df2f3f9f3177b06de628939cb7
binderfs: add new binder devices to binder_devices

When binderfs is not enabled, the binder driver parses the kernel
config to create all binder devices. All of the new binder devices
are stored in the list binder_devices.

When binderfs is enabled, the binder driver creates new binder devices
dynamically when userspace applications call BINDER_CTL_ADD ioctl. But
the devices created in this way are not stored in the same list.

This patch fixes that.

Signed-off-by: Li Li <dualli@google.com>
Acked-by: Carlos Llamas <cmllamas@google.com>
Link: https://lore.kernel.org/r/20241218212935.4162907-2-dualli@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/android/binder.c
drivers/android/binder_internal.h
drivers/android/binderfs.c