提交 dbdb75bd 编写于 作者: D Ding Xiang 提交者: James Morris

security: tomoyo: Fix obsolete function

simple_strtoul is obsolete, and use kstrtouint instead
Signed-off-by: NDing Xiang <dingxiang@cmss.chinamobile.com>
Acked-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: NJames Morris <james.morris@microsoft.com>
上级 e42f6f9b
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册