summaryrefslogtreecommitdiffstats
path: root/mm/slub.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2014-01-04 16:32:31 +0900
committerPekka Enberg <penberg@kernel.org>2014-01-13 21:36:34 +0200
commit26e4f2057516f1c457e0e95346a00303f983ad53 (patch)
treeb1523f7150a10b8a486391a8bd8dc17ebb157a81 /mm/slub.c
parentc65c1877bd6826ce0d9713d76e30a7bed8e49f38 (diff)
downloadlinux-26e4f2057516f1c457e0e95346a00303f983ad53.tar.gz
linux-26e4f2057516f1c457e0e95346a00303f983ad53.tar.bz2
linux-26e4f2057516f1c457e0e95346a00303f983ad53.zip
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>
Diffstat (limited to 'mm/slub.c')
-rw-r--r--mm/slub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 367b224f2aa5..a99e9e67c60e 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -5169,7 +5169,7 @@ static int sysfs_slab_add(struct kmem_cache *s)
}
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) {
kobject_put(&s->kobj);
return err;