You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
fs: provide rcu-walk aware permission i_ops
Signed-off-by: Nick Piggin <npiggin@kernel.dk>
This commit is contained in:
@@ -295,7 +295,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int proc_sys_permission(struct inode *inode, int mask)
|
||||
static int proc_sys_permission(struct inode *inode, int mask,unsigned int flags)
|
||||
{
|
||||
/*
|
||||
* sysctl entries that are not writeable,
|
||||
@@ -305,6 +305,9 @@ static int proc_sys_permission(struct inode *inode, int mask)
|
||||
struct ctl_table *table;
|
||||
int error;
|
||||
|
||||
if (flags & IPERM_FLAG_RCU)
|
||||
return -ECHILD;
|
||||
|
||||
/* Executable files are not allowed under /proc/sys/ */
|
||||
if ((mask & MAY_EXEC) && S_ISREG(inode->i_mode))
|
||||
return -EACCES;
|
||||
|
||||
Reference in New Issue
Block a user