Commit 9db22d92 authored by Kees Cook's avatar Kees Cook Committed by Rafael J. Wysocki

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: 263b4c1a (ACPI / property: Expose data-only subnodes via sysfs)
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 16830985
...@@ -104,7 +104,7 @@ static void acpi_expose_nondev_subnodes(struct kobject *kobj, ...@@ -104,7 +104,7 @@ static void acpi_expose_nondev_subnodes(struct kobject *kobj,
init_completion(&dn->kobj_done); init_completion(&dn->kobj_done);
ret = kobject_init_and_add(&dn->kobj, &acpi_data_node_ktype, ret = kobject_init_and_add(&dn->kobj, &acpi_data_node_ktype,
kobj, dn->name); kobj, "%s", dn->name);
if (ret) if (ret)
acpi_handle_err(dn->handle, "Failed to expose (%d)\n", ret); acpi_handle_err(dn->handle, "Failed to expose (%d)\n", ret);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment