Revert "debugfs: inode: debugfs_create_dir uses mode permission from parent"
PATCH 1/1 Revert "debugfs: inode: debugfs_create_dir uses mode permission from parent"
This reverts commit 95cde3c59966f6371b6bcd9e4e2da2ba64ee9775. It breaks the ioctl(KVM_CREATE_VM) interface.
--- fs/debugfs/inode.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
fs/debugfs/inode.c +1 -3
@@ -512,9 +512,7 @@ struct dentry *debugfs_create_dir(const char *name, struct dentry *parent)if (unlikely (!inode))return failed_creating (dentry); -if (!parent) - parent = debugfs_mount->mnt_root; - inode->i_mode =S_IFDIR | ((d_inode (parent)->i_mode &0770 )); + inode->i_mode =S_IFDIR |S_IRWXU |S_IRUGO |S_IXUGO ; inode->i_op = &simple_dir_inode_operations; inode->i_fop = &simple_dir_operations;
Signature · 1 line
2.14.3
Quoted 3 lines · Thomas Richter
This reverts commit
95cde3c59966f6371b6bcd9e4e2da2ba64ee9775. It breaks theioctl(KVM_CREATE_VM)interface.
Can you elaborate a little more on how this breaks? Fedora has gotten at least one report of a failure in this ioctl and I'd like know if it's the same issue.
Thanks,
Laura
Quoted 21 lines
Signed-off-by Thomas Richter <[email protected]>--- fs/debugfs/inode.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)fs/debugfs/inode.c +1
-3@@ -512,9 +512,7 @@ struct dentry *debugfs_create_dir(const char *name, struct dentry *parent)if (unlikely (!inode))return failed_creating (dentry); -if (!parent) - parent = debugfs_mount->mnt_root; - inode->i_mode =S_IFDIR | ((d_inode (parent)->i_mode &0770 )); + inode->i_mode =S_IFDIR |S_IRWXU |S_IRUGO |S_IXUGO ; inode->i_op = &simple_dir_inode_operations; inode->i_fop = &simple_dir_operations;
Quoted 8 lines · Laura Abbott
Quoted 3 lines · Thomas Richter
This reverts commit
95cde3c59966f6371b6bcd9e4e2da2ba64ee9775. It breaks theioctl(KVM_CREATE_VM)interface.Can you elaborate a little more on how this breaks? Fedora has gotten at least one report of a failure in this ioctl and I'd like know if it's the same issue.
What I reported is here https://lkml.org/lkml/2018/6/8/79
-Mike