aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/android/binder.c
diff options
context:
space:
mode:
authorLi Li <dualli@google.com>2024-12-18 13:29:34 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-01-08 13:18:09 +0100
commit12d909cac1e1c4147cc3417fee804ee12fc6b984 (patch)
tree4c78ab78b18b92761f6137547d25f3a3971ccdbb /drivers/android/binder.c
parentDocumentation ABI: add PPS generators documentation (diff)
downloadwireguard-linux-12d909cac1e1c4147cc3417fee804ee12fc6b984.tar.xz
wireguard-linux-12d909cac1e1c4147cc3417fee804ee12fc6b984.zip
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>
Diffstat (limited to 'drivers/android/binder.c')
-rw-r--r--drivers/android/binder.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 9962c606cabd..34865a655a6a 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -6928,6 +6928,11 @@ const struct binder_debugfs_entry binder_debugfs_entries[] = {
{} /* terminator */
};
+void binder_add_device(struct binder_device *device)
+{
+ hlist_add_head(&device->hlist, &binder_devices);
+}
+
static int __init init_binder_device(const char *name)
{
int ret;