* [PATCHSET v7 1/9] fuse: general bug fixes
[not found] <20260223224617.GA2390314@frogsfrogsfrogs>
@ 2026-02-23 23:00 ` Darrick J. Wong
2026-02-23 23:06 ` [PATCH 2/5] fuse: quiet down complaints in fuse_conn_limit_write Darrick J. Wong
0 siblings, 1 reply; 6+ messages in thread
From: Darrick J. Wong @ 2026-02-23 23:00 UTC (permalink / raw)
To: miklos, djwong
Cc: joannelkoong, stable, joannelkoong, bpf, bernd, neal,
linux-fsdevel, linux-ext4
Hi all,
Here's a collection of fixes that I *think* are bugs in fuse, along with
some scattered improvements.
If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.
With a bit of luck, this should all go splendidly.
Comments and questions are, as always, welcome.
--D
kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=fuse-fixes
---
Commits in this patchset:
* fuse: flush pending FUSE_RELEASE requests before sending FUSE_DESTROY
* fuse: quiet down complaints in fuse_conn_limit_write
* fuse: implement file attributes mask for statx
* fuse: update file mode when updating acls
* fuse: propagate default and file acls on creation
---
fs/fuse/fuse_i.h | 48 ++++++++++++++++++++++++
fs/fuse/acl.c | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
fs/fuse/control.c | 4 +-
fs/fuse/dev.c | 19 ++++++++++
fs/fuse/dir.c | 105 ++++++++++++++++++++++++++++++++++++++++-------------
fs/fuse/inode.c | 16 ++++++++
6 files changed, 267 insertions(+), 30 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/5] fuse: quiet down complaints in fuse_conn_limit_write
2026-02-23 23:00 ` [PATCHSET v7 1/9] fuse: general bug fixes Darrick J. Wong
@ 2026-02-23 23:06 ` Darrick J. Wong
2026-02-24 8:36 ` Horst Birthelmer
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Darrick J. Wong @ 2026-02-23 23:06 UTC (permalink / raw)
To: miklos, djwong
Cc: stable, joannelkoong, bpf, bernd, neal, linux-fsdevel, linux-ext4
From: Darrick J. Wong <djwong@kernel.org>
gcc 15 complains about an uninitialized variable val that is passed by
reference into fuse_conn_limit_write:
control.c: In function ‘fuse_conn_congestion_threshold_write’:
include/asm-generic/rwonce.h:55:37: warning: ‘val’ may be used uninitialized [-Wmaybe-uninitialized]
55 | *(volatile typeof(x) *)&(x) = (val); \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
include/asm-generic/rwonce.h:61:9: note: in expansion of macro ‘__WRITE_ONCE’
61 | __WRITE_ONCE(x, val); \
| ^~~~~~~~~~~~
control.c:178:9: note: in expansion of macro ‘WRITE_ONCE’
178 | WRITE_ONCE(fc->congestion_threshold, val);
| ^~~~~~~~~~
control.c:166:18: note: ‘val’ was declared here
166 | unsigned val;
| ^~~
Unfortunately there's enough macro spew involved in kstrtoul_from_user
that I think gcc gives up on its analysis and sprays the above warning.
AFAICT it's not actually a bug, but we could just zero-initialize the
variable to enable using -Wmaybe-uninitialized to find real problems.
Previously we would use some weird uninitialized_var annotation to quiet
down the warnings, so clearly this code has been like this for quite
some time.
Cc: <stable@vger.kernel.org> # v5.9
Fixes: 3f649ab728cda8 ("treewide: Remove uninitialized_var() usage")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
fs/fuse/control.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/fuse/control.c b/fs/fuse/control.c
index 140bd5730d9984..073c2d8e4dfc7c 100644
--- a/fs/fuse/control.c
+++ b/fs/fuse/control.c
@@ -121,7 +121,7 @@ static ssize_t fuse_conn_max_background_write(struct file *file,
const char __user *buf,
size_t count, loff_t *ppos)
{
- unsigned val;
+ unsigned val = 0;
ssize_t ret;
ret = fuse_conn_limit_write(file, buf, count, ppos, &val,
@@ -163,7 +163,7 @@ static ssize_t fuse_conn_congestion_threshold_write(struct file *file,
const char __user *buf,
size_t count, loff_t *ppos)
{
- unsigned val;
+ unsigned val = 0;
struct fuse_conn *fc;
ssize_t ret;
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/5] fuse: quiet down complaints in fuse_conn_limit_write
2026-02-23 23:06 ` [PATCH 2/5] fuse: quiet down complaints in fuse_conn_limit_write Darrick J. Wong
@ 2026-02-24 8:36 ` Horst Birthelmer
2026-02-24 19:17 ` Darrick J. Wong
2026-02-24 20:09 ` Joanne Koong
2026-02-27 16:05 ` Miklos Szeredi
2 siblings, 1 reply; 6+ messages in thread
From: Horst Birthelmer @ 2026-02-24 8:36 UTC (permalink / raw)
To: Darrick J. Wong
Cc: miklos, stable, joannelkoong, bpf, bernd, neal, linux-fsdevel,
linux-ext4
On Mon, Feb 23, 2026 at 03:06:50PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> gcc 15 complains about an uninitialized variable val that is passed by
> reference into fuse_conn_limit_write:
>
> control.c: In function ‘fuse_conn_congestion_threshold_write’:
> include/asm-generic/rwonce.h:55:37: warning: ‘val’ may be used uninitialized [-Wmaybe-uninitialized]
> 55 | *(volatile typeof(x) *)&(x) = (val); \
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
> include/asm-generic/rwonce.h:61:9: note: in expansion of macro ‘__WRITE_ONCE’
> 61 | __WRITE_ONCE(x, val); \
> | ^~~~~~~~~~~~
> control.c:178:9: note: in expansion of macro ‘WRITE_ONCE’
> 178 | WRITE_ONCE(fc->congestion_threshold, val);
> | ^~~~~~~~~~
> control.c:166:18: note: ‘val’ was declared here
> 166 | unsigned val;
> | ^~~
>
> Unfortunately there's enough macro spew involved in kstrtoul_from_user
> that I think gcc gives up on its analysis and sprays the above warning.
> AFAICT it's not actually a bug, but we could just zero-initialize the
> variable to enable using -Wmaybe-uninitialized to find real problems.
>
> Previously we would use some weird uninitialized_var annotation to quiet
> down the warnings, so clearly this code has been like this for quite
> some time.
>
> Cc: <stable@vger.kernel.org> # v5.9
> Fixes: 3f649ab728cda8 ("treewide: Remove uninitialized_var() usage")
> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> ---
> fs/fuse/control.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>
> diff --git a/fs/fuse/control.c b/fs/fuse/control.c
> index 140bd5730d9984..073c2d8e4dfc7c 100644
> --- a/fs/fuse/control.c
> +++ b/fs/fuse/control.c
> @@ -121,7 +121,7 @@ static ssize_t fuse_conn_max_background_write(struct file *file,
> const char __user *buf,
> size_t count, loff_t *ppos)
> {
> - unsigned val;
> + unsigned val = 0;
> ssize_t ret;
>
> ret = fuse_conn_limit_write(file, buf, count, ppos, &val,
> @@ -163,7 +163,7 @@ static ssize_t fuse_conn_congestion_threshold_write(struct file *file,
> const char __user *buf,
> size_t count, loff_t *ppos)
> {
> - unsigned val;
> + unsigned val = 0;
> struct fuse_conn *fc;
> ssize_t ret;
>
>
>
This looks good to me. Trivial fix for an annoying problem.
Reviewed-by: Horst Birthelmer <hbirthelmer@ddn.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/5] fuse: quiet down complaints in fuse_conn_limit_write
2026-02-24 8:36 ` Horst Birthelmer
@ 2026-02-24 19:17 ` Darrick J. Wong
0 siblings, 0 replies; 6+ messages in thread
From: Darrick J. Wong @ 2026-02-24 19:17 UTC (permalink / raw)
To: Horst Birthelmer
Cc: miklos, stable, joannelkoong, bpf, bernd, neal, linux-fsdevel,
linux-ext4
On Tue, Feb 24, 2026 at 09:36:38AM +0100, Horst Birthelmer wrote:
> On Mon, Feb 23, 2026 at 03:06:50PM -0800, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > gcc 15 complains about an uninitialized variable val that is passed by
> > reference into fuse_conn_limit_write:
> >
> > control.c: In function ‘fuse_conn_congestion_threshold_write’:
> > include/asm-generic/rwonce.h:55:37: warning: ‘val’ may be used uninitialized [-Wmaybe-uninitialized]
> > 55 | *(volatile typeof(x) *)&(x) = (val); \
> > | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
> > include/asm-generic/rwonce.h:61:9: note: in expansion of macro ‘__WRITE_ONCE’
> > 61 | __WRITE_ONCE(x, val); \
> > | ^~~~~~~~~~~~
> > control.c:178:9: note: in expansion of macro ‘WRITE_ONCE’
> > 178 | WRITE_ONCE(fc->congestion_threshold, val);
> > | ^~~~~~~~~~
> > control.c:166:18: note: ‘val’ was declared here
> > 166 | unsigned val;
> > | ^~~
> >
> > Unfortunately there's enough macro spew involved in kstrtoul_from_user
> > that I think gcc gives up on its analysis and sprays the above warning.
> > AFAICT it's not actually a bug, but we could just zero-initialize the
> > variable to enable using -Wmaybe-uninitialized to find real problems.
> >
> > Previously we would use some weird uninitialized_var annotation to quiet
> > down the warnings, so clearly this code has been like this for quite
> > some time.
> >
> > Cc: <stable@vger.kernel.org> # v5.9
> > Fixes: 3f649ab728cda8 ("treewide: Remove uninitialized_var() usage")
> > Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> > ---
> > fs/fuse/control.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> >
> > diff --git a/fs/fuse/control.c b/fs/fuse/control.c
> > index 140bd5730d9984..073c2d8e4dfc7c 100644
> > --- a/fs/fuse/control.c
> > +++ b/fs/fuse/control.c
> > @@ -121,7 +121,7 @@ static ssize_t fuse_conn_max_background_write(struct file *file,
> > const char __user *buf,
> > size_t count, loff_t *ppos)
> > {
> > - unsigned val;
> > + unsigned val = 0;
> > ssize_t ret;
> >
> > ret = fuse_conn_limit_write(file, buf, count, ppos, &val,
> > @@ -163,7 +163,7 @@ static ssize_t fuse_conn_congestion_threshold_write(struct file *file,
> > const char __user *buf,
> > size_t count, loff_t *ppos)
> > {
> > - unsigned val;
> > + unsigned val = 0;
> > struct fuse_conn *fc;
> > ssize_t ret;
> >
> >
> >
>
> This looks good to me. Trivial fix for an annoying problem.
> Reviewed-by: Horst Birthelmer <hbirthelmer@ddn.com>
Thanks for the review!
--D
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/5] fuse: quiet down complaints in fuse_conn_limit_write
2026-02-23 23:06 ` [PATCH 2/5] fuse: quiet down complaints in fuse_conn_limit_write Darrick J. Wong
2026-02-24 8:36 ` Horst Birthelmer
@ 2026-02-24 20:09 ` Joanne Koong
2026-02-27 16:05 ` Miklos Szeredi
2 siblings, 0 replies; 6+ messages in thread
From: Joanne Koong @ 2026-02-24 20:09 UTC (permalink / raw)
To: Darrick J. Wong
Cc: miklos, stable, bpf, bernd, neal, linux-fsdevel, linux-ext4
On Mon, Feb 23, 2026 at 3:06 PM Darrick J. Wong <djwong@kernel.org> wrote:
>
> From: Darrick J. Wong <djwong@kernel.org>
>
> gcc 15 complains about an uninitialized variable val that is passed by
> reference into fuse_conn_limit_write:
>
> control.c: In function ‘fuse_conn_congestion_threshold_write’:
> include/asm-generic/rwonce.h:55:37: warning: ‘val’ may be used uninitialized [-Wmaybe-uninitialized]
> 55 | *(volatile typeof(x) *)&(x) = (val); \
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
> include/asm-generic/rwonce.h:61:9: note: in expansion of macro ‘__WRITE_ONCE’
> 61 | __WRITE_ONCE(x, val); \
> | ^~~~~~~~~~~~
> control.c:178:9: note: in expansion of macro ‘WRITE_ONCE’
> 178 | WRITE_ONCE(fc->congestion_threshold, val);
> | ^~~~~~~~~~
> control.c:166:18: note: ‘val’ was declared here
> 166 | unsigned val;
> | ^~~
>
> Unfortunately there's enough macro spew involved in kstrtoul_from_user
> that I think gcc gives up on its analysis and sprays the above warning.
> AFAICT it's not actually a bug, but we could just zero-initialize the
> variable to enable using -Wmaybe-uninitialized to find real problems.
>
> Previously we would use some weird uninitialized_var annotation to quiet
> down the warnings, so clearly this code has been like this for quite
> some time.
>
> Cc: <stable@vger.kernel.org> # v5.9
> Fixes: 3f649ab728cda8 ("treewide: Remove uninitialized_var() usage")
> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Makes sense to me.
Reviewed-by: Joanne Koong <joannelkoong@gmail.com>
> ---
> fs/fuse/control.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>
> diff --git a/fs/fuse/control.c b/fs/fuse/control.c
> index 140bd5730d9984..073c2d8e4dfc7c 100644
> --- a/fs/fuse/control.c
> +++ b/fs/fuse/control.c
> @@ -121,7 +121,7 @@ static ssize_t fuse_conn_max_background_write(struct file *file,
> const char __user *buf,
> size_t count, loff_t *ppos)
> {
> - unsigned val;
> + unsigned val = 0;
> ssize_t ret;
>
> ret = fuse_conn_limit_write(file, buf, count, ppos, &val,
> @@ -163,7 +163,7 @@ static ssize_t fuse_conn_congestion_threshold_write(struct file *file,
> const char __user *buf,
> size_t count, loff_t *ppos)
> {
> - unsigned val;
> + unsigned val = 0;
> struct fuse_conn *fc;
> ssize_t ret;
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/5] fuse: quiet down complaints in fuse_conn_limit_write
2026-02-23 23:06 ` [PATCH 2/5] fuse: quiet down complaints in fuse_conn_limit_write Darrick J. Wong
2026-02-24 8:36 ` Horst Birthelmer
2026-02-24 20:09 ` Joanne Koong
@ 2026-02-27 16:05 ` Miklos Szeredi
2 siblings, 0 replies; 6+ messages in thread
From: Miklos Szeredi @ 2026-02-27 16:05 UTC (permalink / raw)
To: Darrick J. Wong
Cc: stable, joannelkoong, bpf, bernd, neal, linux-fsdevel, linux-ext4
On Tue, 24 Feb 2026 at 00:06, Darrick J. Wong <djwong@kernel.org> wrote:
>
> From: Darrick J. Wong <djwong@kernel.org>
>
> gcc 15 complains about an uninitialized variable val that is passed by
> reference into fuse_conn_limit_write:
>
> control.c: In function ‘fuse_conn_congestion_threshold_write’:
> include/asm-generic/rwonce.h:55:37: warning: ‘val’ may be used uninitialized [-Wmaybe-uninitialized]
> 55 | *(volatile typeof(x) *)&(x) = (val); \
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
> include/asm-generic/rwonce.h:61:9: note: in expansion of macro ‘__WRITE_ONCE’
> 61 | __WRITE_ONCE(x, val); \
> | ^~~~~~~~~~~~
> control.c:178:9: note: in expansion of macro ‘WRITE_ONCE’
> 178 | WRITE_ONCE(fc->congestion_threshold, val);
> | ^~~~~~~~~~
> control.c:166:18: note: ‘val’ was declared here
> 166 | unsigned val;
> | ^~~
>
> Unfortunately there's enough macro spew involved in kstrtoul_from_user
> that I think gcc gives up on its analysis and sprays the above warning.
> AFAICT it's not actually a bug, but we could just zero-initialize the
> variable to enable using -Wmaybe-uninitialized to find real problems.
>
> Previously we would use some weird uninitialized_var annotation to quiet
> down the warnings, so clearly this code has been like this for quite
> some time.
>
> Cc: <stable@vger.kernel.org> # v5.9
> Fixes: 3f649ab728cda8 ("treewide: Remove uninitialized_var() usage")
> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Applied, thanks.
Miklos
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-02-27 16:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260223224617.GA2390314@frogsfrogsfrogs>
2026-02-23 23:00 ` [PATCHSET v7 1/9] fuse: general bug fixes Darrick J. Wong
2026-02-23 23:06 ` [PATCH 2/5] fuse: quiet down complaints in fuse_conn_limit_write Darrick J. Wong
2026-02-24 8:36 ` Horst Birthelmer
2026-02-24 19:17 ` Darrick J. Wong
2026-02-24 20:09 ` Joanne Koong
2026-02-27 16:05 ` Miklos Szeredi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox