Skip to content

Commit dbdb75b

Browse files
Ding XiangJames Morris
authored andcommitted
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>
1 parent e42f6f9 commit dbdb75b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

security/tomoyo/common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,8 @@ static void tomoyo_read_pid(struct tomoyo_io_buffer *head)
16601660
head->r.eof = true;
16611661
if (tomoyo_str_starts(&buf, "global-pid "))
16621662
global_pid = true;
1663-
pid = (unsigned int) simple_strtoul(buf, NULL, 10);
1663+
if (kstrtouint(buf, 10, &pid))
1664+
return;
16641665
rcu_read_lock();
16651666
if (global_pid)
16661667
p = find_task_by_pid_ns(pid, &init_pid_ns);

0 commit comments

Comments
 (0)