aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
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 /net/sunrpc
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 'net/sunrpc')
-rw-r--r--net/sunrpc/svc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 89a588b4478b..b974571126fe 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -740,7 +740,7 @@ svc_set_num_threads(struct svc_serv *serv, struct svc_pool *pool, int nrservs)
740 740
741 __module_get(serv->sv_module); 741 __module_get(serv->sv_module);
742 task = kthread_create_on_node(serv->sv_function, rqstp, 742 task = kthread_create_on_node(serv->sv_function, rqstp,
743 node, serv->sv_name); 743 node, "%s", serv->sv_name);
744 if (IS_ERR(task)) { 744 if (IS_ERR(task)) {
745 error = PTR_ERR(task); 745 error = PTR_ERR(task);
746 module_put(serv->sv_module); 746 module_put(serv->sv_module);