]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
slub: Fix possible format string bug.
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Sat, 4 Jan 2014 07:32:31 +0000 (16:32 +0900)
committerPekka Enberg <penberg@kernel.org>
Mon, 13 Jan 2014 19:36:34 +0000 (21:36 +0200)
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>
mm/slub.c

index 367b224f2aa559f11f3619163eb6e47550d39c2a..a99e9e67c60e9b5f02e3308510f5b3f6f6fc3dc5 100644 (file)
--- 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;