projects
/
platform
/
kernel
/
linux-rpi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
initramfs: break loop when decompression finishes
[platform/kernel/linux-rpi.git]
/
fs
/
stat.c
diff --git
a/fs/stat.c
b/fs/stat.c
index
d43a5cc
..
5375be5
100644
(file)
--- a/
fs/stat.c
+++ b/
fs/stat.c
@@
-133,7
+133,8
@@
int vfs_getattr_nosec(const struct path *path, struct kstat *stat,
idmap = mnt_idmap(path->mnt);
if (inode->i_op->getattr)
return inode->i_op->getattr(idmap, path, stat,
idmap = mnt_idmap(path->mnt);
if (inode->i_op->getattr)
return inode->i_op->getattr(idmap, path, stat,
- request_mask, query_flags);
+ request_mask,
+ query_flags | AT_GETATTR_NOSEC);
generic_fillattr(idmap, request_mask, inode, stat);
return 0;
generic_fillattr(idmap, request_mask, inode, stat);
return 0;
@@
-166,6
+167,9
@@
int vfs_getattr(const struct path *path, struct kstat *stat,
{
int retval;
{
int retval;
+ if (WARN_ON_ONCE(query_flags & AT_GETATTR_NOSEC))
+ return -EPERM;
+
retval = security_inode_getattr(path);
if (retval)
return retval;
retval = security_inode_getattr(path);
if (retval)
return retval;