Skip to content

Commit

Permalink
security: tomoyo: Fix obsolete function
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ding Xiang authored and James Morris committed Sep 4, 2018
1 parent e42f6f9 commit dbdb75b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion security/tomoyo/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dbdb75b

Please sign in to comment.