diff options
author | Kees Cook <keescook@chromium.org> | 2016-01-07 14:24:29 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-01-07 19:01:41 -0500 |
commit | 9db22d928ca92629f0deb18efed265c4b7c2aa5e (patch) | |
tree | d7a6433d74fd21a5d528ef205e97ab9e85fc9e67 | |
parent | 168309855a7d1e16db751e9c647119fe2d2dc878 (diff) |
ACPI / property: avoid leaking format string into kobject name
The dn->name is expected to be used as a literal, so add the missing
"%s".
Fixes: 263b4c1a64bc (ACPI / property: Expose data-only subnodes via sysfs)
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/device_sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c index 707cf6213bc2..b9afb47db7ed 100644 --- a/drivers/acpi/device_sysfs.c +++ b/drivers/acpi/device_sysfs.c | |||
@@ -104,7 +104,7 @@ static void acpi_expose_nondev_subnodes(struct kobject *kobj, | |||
104 | 104 | ||
105 | init_completion(&dn->kobj_done); | 105 | init_completion(&dn->kobj_done); |
106 | ret = kobject_init_and_add(&dn->kobj, &acpi_data_node_ktype, | 106 | ret = kobject_init_and_add(&dn->kobj, &acpi_data_node_ktype, |
107 | kobj, dn->name); | 107 | kobj, "%s", dn->name); |
108 | if (ret) | 108 | if (ret) |
109 | acpi_handle_err(dn->handle, "Failed to expose (%d)\n", ret); | 109 | acpi_handle_err(dn->handle, "Failed to expose (%d)\n", ret); |
110 | else | 110 | else |