summaryrefslogtreecommitdiff
path: root/fs/stat.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-11-27 09:23:49 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-11-27 09:23:49 +0000
commit3396b3372e61f8b579395e32c53212612b14daff (patch)
tree6e863b97cc8eb2e0f52d02b0520720ea443b6d58 /fs/stat.c
parent6acba0345b68772830582ca1ca369a2f45631275 (diff)
parent2cc14f52aeb78ce3f29677c2de1f06c0e91471ab (diff)
downloadlinux-3396b3372e61f8b579395e32c53212612b14daff.tar.gz
linux-3396b3372e61f8b579395e32c53212612b14daff.tar.bz2
linux-3396b3372e61f8b579395e32c53212612b14daff.zip
Merge 6.7-rc3 into usb-next
We need the USB/PHY/Thunderbolt fixes in here as well for later patches to build on top of. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/stat.c')
-rw-r--r--fs/stat.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/stat.c b/fs/stat.c
index 24bb0209e459..f721d26ec3f7 100644
--- 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,
- request_mask, query_flags);
+ request_mask,
+ query_flags | AT_GETATTR_NOSEC);
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;
+ if (WARN_ON_ONCE(query_flags & AT_GETATTR_NOSEC))
+ return -EPERM;
+
retval = security_inode_getattr(path);
if (retval)
return retval;