slub: Fix possible format string bug.
The "name" is determined at runtime and is parsed as format string. Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
parent
c65c1877bd
commit
26e4f20575
|
@ -5169,7 +5169,7 @@ static int sysfs_slab_add(struct kmem_cache *s)
|
||||||
}
|
}
|
||||||
|
|
||||||
s->kobj.kset = slab_kset;
|
s->kobj.kset = slab_kset;
|
||||||
err = kobject_init_and_add(&s->kobj, &slab_ktype, NULL, name);
|
err = kobject_init_and_add(&s->kobj, &slab_ktype, NULL, "%s", name);
|
||||||
if (err) {
|
if (err) {
|
||||||
kobject_put(&s->kobj);
|
kobject_put(&s->kobj);
|
||||||
return err;
|
return err;
|
||||||
|
|
Loading…
Reference in New Issue