public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"Kurmi, Suresh Kumar" <suresh.kumar.kurmi@intel.com>,
	"Saarinen, Jani" <jani.saarinen@intel.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	Alexander Gordeev <agordeev@linux.ibm.com>
Subject: Re: Regression on linux-next (next-20250120)
Date: Mon, 27 Jan 2025 05:04:16 +0000	[thread overview]
Message-ID: <20250127050416.GE1977892@ZenIV> (raw)
In-Reply-To: <Z5Zazwd0nto-v-RS@tuxmaker.boeblingen.de.ibm.com>

On Sun, Jan 26, 2025 at 04:54:55PM +0100, Alexander Gordeev wrote:

> > > Since the version next-20250120 [2], we are seeing the following regression
> > 
> > Ugh...  To narrow the things down, could you see if replacing
> >                 fsd = kmalloc(sizeof(*fsd), GFP_KERNEL);
> > with
> >                 fsd = kzalloc(sizeof(*fsd), GFP_KERNEL);
> > in fs/debugfs/file.c:__debugfs_file_get() affects the test?
> 
> This change fixes lots of the below failures in our CI. FWIW:
> 
> Tested-by: Alexander Gordeev <agordeev@linux.ibm.com>

The real fix follows:

[PATCH] Fix the missing initializations in __debugfs_file_get()

both method table pointers in debugfs_fsdata need to be initialized,
obviously...

Fixes: 41a0ecc0997c "debugfs: get rid of dynamically allocation proxy_ops"
Fucked-up-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index e33cc77699cd..212cd8128e1f 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -111,6 +111,7 @@ static int __debugfs_file_get(struct dentry *dentry, enum dbgfs_get_mode mode)
 				fsd->methods |= HAS_READ;
 			if (ops->write)
 				fsd->methods |= HAS_WRITE;
+			fsd->real_fops = NULL;
 		} else {
 			const struct file_operations *ops;
 			ops = fsd->real_fops = DEBUGFS_I(inode)->real_fops;
@@ -124,6 +125,7 @@ static int __debugfs_file_get(struct dentry *dentry, enum dbgfs_get_mode mode)
 				fsd->methods |= HAS_IOCTL;
 			if (ops->poll)
 				fsd->methods |= HAS_POLL;
+			fsd->short_fops = NULL;
 		}
 		refcount_set(&fsd->active_users, 1);
 		init_completion(&fsd->active_users_drained);

  reply	other threads:[~2025-01-27  5:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-23 15:41 Regression on linux-next (next-20250120) Borah, Chaitanya Kumar
2025-01-23 18:18 ` Al Viro
2025-01-24 13:55   ` Borah, Chaitanya Kumar
2025-01-26 15:54   ` Alexander Gordeev
2025-01-27  5:04     ` Al Viro [this message]
2025-01-28 16:00       ` Borah, Chaitanya Kumar
2025-01-29  4:37         ` Al Viro
2025-01-29  7:13           ` Greg Kroah-Hartman
2025-01-29 19:19             ` Al Viro
2025-01-30  7:25               ` Greg Kroah-Hartman
2025-01-30  8:08                 ` Borah, Chaitanya Kumar
2025-01-30  8:36                   ` Greg Kroah-Hartman

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=20250127050416.GE1977892@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=agordeev@linux.ibm.com \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.saarinen@intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=suresh.kumar.kurmi@intel.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