]> Git Repo - linux.git/commitdiff
security: tomoyo: Fix obsolete function
authorDing Xiang <[email protected]>
Tue, 4 Sep 2018 08:41:39 +0000 (16:41 +0800)
committerJames Morris <[email protected]>
Tue, 4 Sep 2018 18:56:25 +0000 (11:56 -0700)
simple_strtoul is obsolete, and use kstrtouint instead

Signed-off-by: Ding Xiang <[email protected]>
Acked-by: Tetsuo Handa <[email protected]>
Signed-off-by: James Morris <[email protected]>
security/tomoyo/common.c

index 03923a138ef54430612eceeee9d962b9f37f6699..9b38f94b5dd09e1670b1a17e47454cc36f7614dc 100644 (file)
@@ -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);
This page took 0.063372 seconds and 4 git commands to generate.