public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Richter <tmricht@linux.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: efault@gmx.de, Thomas Richter <tmricht@linux.ibm.com>
Subject: [PATCH] Revert "debugfs: inode: debugfs_create_dir uses mode permission from parent"
Date: Mon, 11 Jun 2018 11:28:10 +0200	[thread overview]
Message-ID: <20180611092810.21886-1-tmricht@linux.ibm.com> (raw)

This reverts commit 95cde3c59966f6371b6bcd9e4e2da2ba64ee9775.
It breaks the ioctl(KVM_CREATE_VM) interface.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
---
 fs/debugfs/inode.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index a913b12fc7f8..13b01351dd1c 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -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;
 
-- 
2.14.3

             reply	other threads:[~2018-06-11  9:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-11  9:28 Thomas Richter [this message]
2018-06-11 18:12 ` [PATCH] Revert "debugfs: inode: debugfs_create_dir uses mode permission from parent" Laura Abbott
2018-06-12  2:37   ` Mike Galbraith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180611092810.21886-1-tmricht@linux.ibm.com \
    --to=tmricht@linux.ibm.com \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox