mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Edward Adam Davis <eadavis@sina.com>
To: syzbot+4fae162886e497f72228@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] kernel BUG in create_default_group...
Date: Wed, 21 Oct 2026 13:30:53 +0800	[thread overview]
Message-ID: <20261021053053.50220-1-eadavis@sina.com> (raw)
In-Reply-To: <6ad65cac.5a04d468.191e0a.001c.GAE@google.com>

From: Edward Aadm Davis <eadavis@sina.com>

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 58161ead29e5

diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c
index eda80c2a2d38..45a955b8ab36 100644
--- a/fs/configfs/dir.c
+++ b/fs/configfs/dir.c
@@ -313,7 +313,6 @@ static int configfs_create_dir(struct config_item *item, struct dentry *dentry,
 		goto out_remove;
 
 	inode->i_op = &configfs_dir_inode_operations;
-	inode->i_fop = &configfs_dir_operations;
 	/* directory inodes start off with i_nlink == 2 (for "." entry) */
 	inc_nlink(inode);
 	d_make_persistent(dentry, inode);
@@ -930,6 +929,10 @@ static int configfs_attach_group(struct config_item *item,
 		inode_unlock(d_inode(dentry));
 		if (ret)
 			d_delete(dentry);
+		else {
+			struct inode *inode = d_inode(dentry);
+			inode->i_fop = &configfs_dir_operations;
+		}
 	}
 
 	return ret;
@@ -1430,8 +1433,13 @@ static struct dentry *configfs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
 
 	if (group)
 		ret = configfs_attach_group(item, dentry, frag);
-	else
+	else {
 		ret = configfs_attach_item(item, dentry, frag);
+		if (!ret) {
+			struct inode *inode = d_inode(dentry);
+			inode->i_fop = &configfs_dir_operations;
+		}
+	}
 
 	spin_lock(&configfs_dirent_lock);
 	sd->s_type &= ~CONFIGFS_USET_IN_MKDIR;

  reply	other threads:[~2026-10-21  5:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19 18:08 syzbot
2026-10-21  5:30 ` Edward Adam Davis [this message]
2026-10-21  5:50   ` syzbot
2026-10-21  6:25 ` [PATCH] configfs: Delay the fop setting to prevent noise generated by open Edward Adam Davis

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=20261021053053.50220-1-eadavis@sina.com \
    --to=eadavis@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+4fae162886e497f72228@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /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

all inboxes | Powered by JetHome®