summaryrefslogtreecommitdiffstats
path: root/security/tomoyo
diff options
context:
space:
mode:
authorDing Xiang <dingxiang@cmss.chinamobile.com>2018-09-04 16:41:39 +0800
committerJames Morris <james.morris@microsoft.com>2018-09-04 11:56:25 -0700
commitdbdb75bd087954aaf9b3248109cb85748b62c21d (patch)
tree61513d189f00ee7d7f4ef433b47a7c7a88f1f8ca /security/tomoyo
parente42f6f9be4f83c537aa81b4c6239ea94ff5b29ce (diff)
downloadblackbird-op-linux-dbdb75bd087954aaf9b3248109cb85748b62c21d.tar.gz
blackbird-op-linux-dbdb75bd087954aaf9b3248109cb85748b62c21d.zip
security: tomoyo: Fix obsolete function
simple_strtoul is obsolete, and use kstrtouint instead Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com> Acked-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: James Morris <james.morris@microsoft.com>
Diffstat (limited to 'security/tomoyo')
-rw-r--r--security/tomoyo/common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c
index 03923a138ef5..9b38f94b5dd0 100644
--- a/security/tomoyo/common.c
+++ b/security/tomoyo/common.c
@@ -1660,7 +1660,8 @@ static void tomoyo_read_pid(struct tomoyo_io_buffer *head)
head->r.eof = true;
if (tomoyo_str_starts(&buf, "global-pid "))
global_pid = true;
- pid = (unsigned int) simple_strtoul(buf, NULL, 10);
+ if (kstrtouint(buf, 10, &pid))
+ return;
rcu_read_lock();
if (global_pid)
p = find_task_by_pid_ns(pid, &init_pid_ns);
OpenPOWER on IntegriCloud