Skip to content

Commit

Permalink
ACPI / property: avoid leaking format string into kobject name
Browse files Browse the repository at this point in the history
The dn->name is expected to be used as a literal, so add the missing
"%s".

Fixes: 263b4c1 (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>
  • Loading branch information
Kees Cook authored and Rafael J. Wysocki committed Jan 8, 2016
1 parent 1683098 commit 9db22d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/device_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static void acpi_expose_nondev_subnodes(struct kobject *kobj,

init_completion(&dn->kobj_done);
ret = kobject_init_and_add(&dn->kobj, &acpi_data_node_ktype,
kobj, dn->name);
kobj, "%s", dn->name);
if (ret)
acpi_handle_err(dn->handle, "Failed to expose (%d)\n", ret);
else
Expand Down

0 comments on commit 9db22d9

Please sign in to comment.