aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/android/binderfs.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/binderfs.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/binderfs.c')
-rw-r--r--drivers/android/binderfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
index ad1fa7abc323..bc6bae76ccaf 100644
--- a/drivers/android/binderfs.c
+++ b/drivers/android/binderfs.c
@@ -207,6 +207,8 @@ static int binderfs_binder_device_create(struct inode *ref_inode,
fsnotify_create(root->d_inode, dentry);
inode_unlock(d_inode(root));
+ binder_add_device(device);
+
return 0;
err: