Commit cf127911 authored by Al Viro's avatar Al Viro

proc_fd_permission() is doesn't need to bail out in RCU mode

nothing blocking except generic_permission()
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 730e908f
...@@ -2169,11 +2169,7 @@ static const struct file_operations proc_fd_operations = { ...@@ -2169,11 +2169,7 @@ static const struct file_operations proc_fd_operations = {
*/ */
static int proc_fd_permission(struct inode *inode, int mask, unsigned int flags) static int proc_fd_permission(struct inode *inode, int mask, unsigned int flags)
{ {
int rv; int rv = generic_permission(inode, mask, flags, NULL);
if (flags & IPERM_FLAG_RCU)
return -ECHILD;
rv = generic_permission(inode, mask, flags, NULL);
if (rv == 0) if (rv == 0)
return 0; return 0;
if (task_pid(current) == proc_pid(inode)) if (task_pid(current) == proc_pid(inode))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment