diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2004-10-22 00:01:16 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <greg@kroah.com> | 2004-10-22 00:01:16 -0700 |
commit | dcde404f44f1d7266ab25c35f1ea29c7ddb47548 (patch) | |
tree | ffc4d0619bca95c0a69a348565e3bb6a65f29dff /kernel | |
parent | ba649f5bb4b3901a8904f5128c07f38b8e42a5e2 (diff) | |
download | history-dcde404f44f1d7266ab25c35f1ea29c7ddb47548.tar.gz |
[PATCH] avoid problems with kobject_set_name and name with %
kobject_set_name takes a printf style argument list. There are many
callers that pass only one string, if this string contained a '%' character
than bad things would happen. The fix is simple.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/module.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/module.c b/kernel/module.c index bb08e9779607cb..dca05d977d16f0 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1120,7 +1120,7 @@ static int mod_sysfs_setup(struct module *mod, return -ENOMEM; memset(&mod->mkobj->kobj, 0, sizeof(mod->mkobj->kobj)); - err = kobject_set_name(&mod->mkobj->kobj, mod->name); + err = kobject_set_name(&mod->mkobj->kobj, "%s", mod->name); if (err) goto out; kobj_set_kset_s(mod->mkobj, module_subsys); |