summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorTetsuo Handa2014-01-04 08:32:31 +0100
committerPekka Enberg2014-01-13 20:36:34 +0100
commit26e4f2057516f1c457e0e95346a00303f983ad53 (patch)
treeb1523f7150a10b8a486391a8bd8dc17ebb157a81 /mm
parentslub: use lockdep_assert_held (diff)
downloadkernel-qcow2-linux-26e4f2057516f1c457e0e95346a00303f983ad53.tar.gz
kernel-qcow2-linux-26e4f2057516f1c457e0e95346a00303f983ad53.tar.xz
kernel-qcow2-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')
-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;