summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2013-07-03 15:04:58 -0700
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:51:23 +0900
commit0a62b8507fa2b9d277d50eb415dc1c3c21320e53 (patch)
tree82d83d66b8f01a9eae7f66db66a32d41453218c0 /net
parent9e6d533d0c4d4ae271b87cb81219ac3e2f89f9e0 (diff)
downloadlinux-3.10-0a62b8507fa2b9d277d50eb415dc1c3c21320e53.tar.gz
linux-3.10-0a62b8507fa2b9d277d50eb415dc1c3c21320e53.tar.bz2
linux-3.10-0a62b8507fa2b9d277d50eb415dc1c3c21320e53.zip
upstream: 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')
-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 89a588b4478..b974571126f 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)
__module_get(serv->sv_module);
task = kthread_create_on_node(serv->sv_function, rqstp,
- node, serv->sv_name);
+ node, "%s", serv->sv_name);
if (IS_ERR(task)) {
error = PTR_ERR(task);
module_put(serv->sv_module);