diff options
| author | Dave Airlie <[email protected]> | 2021-06-23 00:07:48 +0000 |
|---|---|---|
| committer | Dave Airlie <[email protected]> | 2021-06-23 00:07:48 +0000 |
| commit | f45fbbb6d5cff29ddfc708676ec1c2496eed3a07 (patch) | |
| tree | 5496fee9f6b10da368aa49b03612061156e42d2f /fs/debugfs/inode.c | |
| parent | Merge tag 'amd-drm-next-5.14-2021-06-16' of https://gitlab.freedesktop.org/ag... (diff) | |
| parent | Linux 5.13-rc7 (diff) | |
| download | kernel-f45fbbb6d5cff29ddfc708676ec1c2496eed3a07.tar.gz kernel-f45fbbb6d5cff29ddfc708676ec1c2496eed3a07.zip | |
Backmerge tag 'v5.13-rc7' into drm-next
Backmerge Linux 5.13-rc7 to make some pulls from later bases apply,
and to bake in the conflicts so far.
Diffstat (limited to 'fs/debugfs/inode.c')
| -rw-r--r-- | fs/debugfs/inode.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 1d252164d97b..8129a430d789 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -45,10 +45,13 @@ static unsigned int debugfs_allow __ro_after_init = DEFAULT_DEBUGFS_ALLOW_BITS; static int debugfs_setattr(struct user_namespace *mnt_userns, struct dentry *dentry, struct iattr *ia) { - int ret = security_locked_down(LOCKDOWN_DEBUGFS); + int ret; - if (ret && (ia->ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID))) - return ret; + if (ia->ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID)) { + ret = security_locked_down(LOCKDOWN_DEBUGFS); + if (ret) + return ret; + } return simple_setattr(&init_user_ns, dentry, ia); } |
