linux/fs/fuse
Darrick J. Wong 4c9c479cec fuse: quiet down complaints in fuse_conn_limit_write
commit 129a45f975 upstream.

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: 3f649ab728 ("treewide: Remove uninitialized_var() usage")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-06-01 17:35:12 +02:00
..
acl.c vfs: add rcu argument to ->get_acl() callback 2021-08-18 22:08:24 +02:00
control.c fuse: quiet down complaints in fuse_conn_limit_write 2026-06-01 17:35:12 +02:00
cuse.c fuse: fix UAF in rcu pathwalks 2024-09-04 13:23:23 +02:00
dax.c fuse: fix dax truncate/punch_hole fault path 2025-04-10 14:32:02 +02:00
dev.c fuse: Initialize beyond-EOF page contents before setting uptodate 2024-09-04 13:23:14 +02:00
dir.c fuse: allocate ff->release_args only if release is needed 2025-10-29 14:03:14 +01:00
file.c fuse: fix readahead reclaim deadlock 2026-01-19 13:10:08 +01:00
fuse_i.h fuse: allocate ff->release_args only if release is needed 2025-10-29 14:03:14 +01:00
inode.c fuse: fix UAF in rcu pathwalks 2024-09-04 13:23:23 +02:00
ioctl.c fuse: ioctl: translate ENOSYS in outarg 2023-07-27 08:46:54 +02:00
Kconfig virtiofs: implement dax read/write operations 2020-09-10 11:39:23 +02:00
Makefile fuse: move ioctl to separate source file 2021-04-12 15:04:30 +02:00
readdir.c fuse: reject oversized dirents in page cache 2026-06-01 17:35:12 +02:00
virtio_fs.c virtiofs: add filesystem context source name check 2025-05-02 07:44:14 +02:00
xattr.c fuse: use unsigned type for getxattr/listxattr size truncation 2024-09-12 11:07:44 +02:00