Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

proc: convert the return type of proc_fd_access_allowed() to be boolean

Convert return type of proc_fd_access_allowed() and the 'allowed' in it
to be boolean since the return type of ptrace_may_access() is boolean.

Link: https://lkml.kernel.org/r/20211219024404.29779-1-zhengqi.arch@bytedance.com
Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Qi Zheng and committed by
Linus Torvalds
51a18734 ae62fbe2

+2 -2
+2 -2
fs/proc/base.c
··· 670 670 /************************************************************************/ 671 671 672 672 /* permission checks */ 673 - static int proc_fd_access_allowed(struct inode *inode) 673 + static bool proc_fd_access_allowed(struct inode *inode) 674 674 { 675 675 struct task_struct *task; 676 - int allowed = 0; 676 + bool allowed = false; 677 677 /* Allow access to a task's file descriptors if it is us or we 678 678 * may use ptrace attach to the process and find out that 679 679 * information.