summaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorKees Cook2013-07-04 00:04:58 +0200
committerLinus Torvalds2013-07-04 01:07:41 +0200
commitf170168b9a0b61ea1e647b082b38f605f1d3de3e (patch)
tree4381c129ee9af108e368e6c8255df53cbe233257 /fs/lockd
parentdrivers: avoid format strings in names passed to alloc_workqueue() (diff)
downloadkernel-qcow2-linux-f170168b9a0b61ea1e647b082b38f605f1d3de3e.tar.gz
kernel-qcow2-linux-f170168b9a0b61ea1e647b082b38f605f1d3de3e.tar.xz
kernel-qcow2-linux-f170168b9a0b61ea1e647b082b38f605f1d3de3e.zip
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)
svc_sock_update_bufs(serv);
serv->sv_maxconn = nlm_max_connections;
- nlmsvc_task = kthread_run(lockd, nlmsvc_rqst, serv->sv_name);
+ nlmsvc_task = kthread_run(lockd, nlmsvc_rqst, "%s", serv->sv_name);
if (IS_ERR(nlmsvc_task)) {
error = PTR_ERR(nlmsvc_task);
printk(KERN_WARNING