diff options
author | Kees Cook <keescook@chromium.org> | 2013-07-03 18:04:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 19:07:41 -0400 |
commit | f170168b9a0b61ea1e647b082b38f605f1d3de3e (patch) | |
tree | 4381c129ee9af108e368e6c8255df53cbe233257 /kernel/rcutree.c | |
parent | d8537548c924db3c44afde7646b6e220c7beb79d (diff) |
drivers: avoid parsing names as kthread_run() format strings
Calling kthread_run with a single name parameter causes it to be handled
as a format string. Many callers are passing potentially dynamic string
content, so use "%s" in those cases to avoid any potential accidents.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r-- | kernel/rcutree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index cf3adc6fe001..e08abb9461ac 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -3026,7 +3026,7 @@ static int __init rcu_spawn_gp_kthread(void) | |||
3026 | struct task_struct *t; | 3026 | struct task_struct *t; |
3027 | 3027 | ||
3028 | for_each_rcu_flavor(rsp) { | 3028 | for_each_rcu_flavor(rsp) { |
3029 | t = kthread_run(rcu_gp_kthread, rsp, rsp->name); | 3029 | t = kthread_run(rcu_gp_kthread, rsp, "%s", rsp->name); |
3030 | BUG_ON(IS_ERR(t)); | 3030 | BUG_ON(IS_ERR(t)); |
3031 | rnp = rcu_get_root(rsp); | 3031 | rnp = rcu_get_root(rsp); |
3032 | raw_spin_lock_irqsave(&rnp->lock, flags); | 3032 | raw_spin_lock_irqsave(&rnp->lock, flags); |