[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d80c0df75fc601ffd3f957084574f10abaf3bedc.1699564053.git.kjlx@templeofstupid.com>
Date: Thu, 9 Nov 2023 14:37:28 -0800
From: Krister Johansen <kjlx@...pleofstupid.com>
To: Miklos Szeredi <miklos@...redi.hu>, linux-fsdevel@...r.kernel.org
Cc: Miklos Szeredi <mszeredi@...hat.com>, linux-kernel@...r.kernel.org,
German Maglione <gmaglione@...hat.com>,
Greg Kurz <groug@...d.org>, Max Reitz <mreitz@...hat.com>,
Bernd Schubert <bernd.schubert@...tmail.fm>,
"Borah, Chaitanya Kumar" <chaitanya.kumar.borah@...el.com>,
Naresh Kamboju <naresh.kamboju@...aro.org>,
Dan Carpenter <dan.carpenter@...aro.org>,
"Kurmi, Suresh Kumar" <suresh.kumar.kurmi@...el.com>,
"Saarinen, Jani" <jani.saarinen@...el.com>,
lkft-triage@...ts.linaro.org, linux-kselftest@...r.kernel.org,
regressions@...ts.linux.dev, intel-gfx@...ts.freedesktop.org
Subject: [PATCH 1/2] fuse: ensure submount_lookup is initialized on alloc
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@...pleofstupid.com>
Cc: stable@...r.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
Powered by blists - more mailing lists