aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2013-07-03 18:04:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 19:07:41 -0400
commitf170168b9a0b61ea1e647b082b38f605f1d3de3e (patch)
tree4381c129ee9af108e368e6c8255df53cbe233257 /fs/lockd
parentd8537548c924db3c44afde7646b6e220c7beb79d (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 'fs/lockd')
-rw-r--r--fs/lockd/svc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index a2aa97d45670..10d6c41aecad 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -305,7 +305,7 @@ static int lockd_start_svc(struct svc_serv *serv)
305 svc_sock_update_bufs(serv); 305 svc_sock_update_bufs(serv);
306 serv->sv_maxconn = nlm_max_connections; 306 serv->sv_maxconn = nlm_max_connections;
307 307
308 nlmsvc_task = kthread_run(lockd, nlmsvc_rqst, serv->sv_name); 308 nlmsvc_task = kthread_run(lockd, nlmsvc_rqst, "%s", serv->sv_name);
309 if (IS_ERR(nlmsvc_task)) { 309 if (IS_ERR(nlmsvc_task)) {
310 error = PTR_ERR(nlmsvc_task); 310 error = PTR_ERR(nlmsvc_task);
311 printk(KERN_WARNING 311 printk(KERN_WARNING