diff options
Diffstat (limited to 'drivers/android')
-rw-r--r-- | drivers/android/binderfs.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c index e773f45d19d9..d8307cccbef8 100644 --- a/drivers/android/binderfs.c +++ b/drivers/android/binderfs.c @@ -553,6 +553,18 @@ static struct file_system_type binder_fs_type = { int __init init_binderfs(void) { int ret; + const char *name; + size_t len; + + /* Verify that the default binderfs device names are valid. */ + name = binder_devices_param; + for (len = strcspn(name, ","); len > 0; len = strcspn(name, ",")) { + if (len > BINDERFS_MAX_NAME) + return -E2BIG; + name += len; + if (*name == ',') + name++; + } /* Allocate new major number for binderfs. */ ret = alloc_chrdev_region(&binderfs_dev, 0, BINDERFS_MAX_MINOR, |