All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krister Johansen <kjlx@templeofstupid.com>
To: Miklos Szeredi <miklos@szeredi.hu>, linux-fsdevel@vger.kernel.org
Cc: Miklos Szeredi <mszeredi@redhat.com>,
	linux-kernel@vger.kernel.org,
	German Maglione <gmaglione@redhat.com>,
	Greg Kurz <groug@kaod.org>, Max Reitz <mreitz@redhat.com>,
	Bernd Schubert <bernd.schubert@fastmail.fm>,
	"Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com>,
	Naresh Kamboju <naresh.kamboju@linaro.org>,
	Dan Carpenter <dan.carpenter@linaro.org>,
	"Kurmi, Suresh Kumar" <suresh.kumar.kurmi@intel.com>,
	"Saarinen, Jani" <jani.saarinen@intel.com>,
	lkft-triage@lists.linaro.org, linux-kselftest@vger.kernel.org,
	regressions@lists.linux.dev, intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/2] fuse: ensure submount_lookup is initialized on alloc
Date: Thu, 9 Nov 2023 14:37:28 -0800	[thread overview]
Message-ID: <d80c0df75fc601ffd3f957084574f10abaf3bedc.1699564053.git.kjlx@templeofstupid.com> (raw)
In-Reply-To: <cover.1699564053.git.kjlx@templeofstupid.com>

When introduced, the submount lookup reference tracking neglected to set
an initial value in the fuse inode as part of fuse_inode_alloc.  Users
running with SLUB_DEBUG enabled caught and reported this error.  Fix by
ensuring that this value is always initialized to NULL.

Signed-off-by: Krister Johansen <kjlx@templeofstupid.com>
Cc: stable@vger.kernel.org
Fixes: 513dfacefd71 ("fuse: share lookup state between submount and its parent")
---
 fs/fuse/inode.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 243bda3cfdf6..d7ebc322e55b 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -103,6 +103,7 @@ static struct inode *fuse_alloc_inode(struct super_block *sb)
 	fi->state = 0;
 	mutex_init(&fi->mutex);
 	spin_lock_init(&fi->lock);
+	fi->submount_lookup = NULL;
 	fi->forget = fuse_alloc_forget();
 	if (!fi->forget)
 		goto out_free;
-- 
2.25.1


WARNING: multiple messages have this Message-ID (diff)
From: Krister Johansen <kjlx@templeofstupid.com>
To: Miklos Szeredi <miklos@szeredi.hu>, linux-fsdevel@vger.kernel.org
Cc: Miklos Szeredi <mszeredi@redhat.com>,
	linux-kselftest@vger.kernel.org,
	German Maglione <gmaglione@redhat.com>,
	Bernd Schubert <bernd.schubert@fastmail.fm>,
	Naresh Kamboju <naresh.kamboju@linaro.org>,
	linux-kernel@vger.kernel.org, lkft-triage@lists.linaro.org,
	Max Reitz <mreitz@redhat.com>, Greg Kurz <groug@kaod.org>,
	"Kurmi, Suresh Kumar" <suresh.kumar.kurmi@intel.com>,
	intel-gfx@lists.freedesktop.org,
	Dan Carpenter <dan.carpenter@linaro.org>,
	regressions@lists.linux.dev
Subject: [Intel-gfx] [PATCH 1/2] fuse: ensure submount_lookup is initialized on alloc
Date: Thu, 9 Nov 2023 14:37:28 -0800	[thread overview]
Message-ID: <d80c0df75fc601ffd3f957084574f10abaf3bedc.1699564053.git.kjlx@templeofstupid.com> (raw)
In-Reply-To: <cover.1699564053.git.kjlx@templeofstupid.com>

When introduced, the submount lookup reference tracking neglected to set
an initial value in the fuse inode as part of fuse_inode_alloc.  Users
running with SLUB_DEBUG enabled caught and reported this error.  Fix by
ensuring that this value is always initialized to NULL.

Signed-off-by: Krister Johansen <kjlx@templeofstupid.com>
Cc: stable@vger.kernel.org
Fixes: 513dfacefd71 ("fuse: share lookup state between submount and its parent")
---
 fs/fuse/inode.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 243bda3cfdf6..d7ebc322e55b 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -103,6 +103,7 @@ static struct inode *fuse_alloc_inode(struct super_block *sb)
 	fi->state = 0;
 	mutex_init(&fi->mutex);
 	spin_lock_init(&fi->lock);
+	fi->submount_lookup = NULL;
 	fi->forget = fuse_alloc_forget();
 	if (!fi->forget)
 		goto out_free;
-- 
2.25.1


  reply	other threads:[~2023-11-09 22:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09 22:36 [PATCH 0/2] Fuse submount_lookup needs to be initialized Krister Johansen
2023-11-09 22:36 ` [Intel-gfx] " Krister Johansen
2023-11-09 22:37 ` Krister Johansen [this message]
2023-11-09 22:37   ` [Intel-gfx] [PATCH 1/2] fuse: ensure submount_lookup is initialized on alloc Krister Johansen
2023-11-09 22:37 ` [v5 PATCH 2/2] fuse: share lookup state between submount and its parent Krister Johansen
2023-11-09 22:37   ` [Intel-gfx] " Krister Johansen
2023-11-10  9:44 ` [PATCH 0/2] Fuse submount_lookup needs to be initialized Miklos Szeredi
2023-11-10  9:44   ` [Intel-gfx] " Miklos Szeredi
2023-11-13 19:23 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2023-11-13 19:38 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-11-14  0:57 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

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=d80c0df75fc601ffd3f957084574f10abaf3bedc.1699564053.git.kjlx@templeofstupid.com \
    --to=kjlx@templeofstupid.com \
    --cc=bernd.schubert@fastmail.fm \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=dan.carpenter@linaro.org \
    --cc=gmaglione@redhat.com \
    --cc=groug@kaod.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.saarinen@intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=miklos@szeredi.hu \
    --cc=mreitz@redhat.com \
    --cc=mszeredi@redhat.com \
    --cc=naresh.kamboju@linaro.org \
    --cc=regressions@lists.linux.dev \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.