diff options
| author | Karl Mehltretter <kmehltretter@gmail.com> | 2026-08-11 21:57:33 +0200 |
|---|---|---|
| committer | Miklos Szeredi <mszeredi@redhat.com> | 2026-09-28 10:57:54 +0200 |
| commit | 6e887377a63f670d79f3d8a107f29e745e9ddf43 (patch) | |
| tree | a7cb8f1777ee51caff6e4c79dc2821f1c0cdc852 /include/uapi/linux/errqueue.h | |
| parent | ab38882862f7ca0fec35b1c85a48fb51b0ae9c65 (diff) | |
| download | linux-next-6e887377a63f670d79f3d8a107f29e745e9ddf43.tar.gz linux-next-6e887377a63f670d79f3d8a107f29e745e9ddf43.zip | |
fuse: fix GCC 8 build with CONFIG_PROFILE_ALL_BRANCHES
Commit 25307ca50b815 ("fuse: simplify logic in fuse_notify_store() and
fuse_retrieve()") introduced a loff_t cursor and used it in place of
outarg's offset field. In the min() expression this changed the second
operand from unsigned to signed.
With CONFIG_PROFILE_ALL_BRANCHES, GCC 8 does not propagate the range
established by the preceding MAX_LFS_FILESIZE check through the branch
profiling code. Consequently, min() cannot prove that the signed operand
is nonnegative and rejects the mixed-signedness comparison:
min(outarg.size, ((loff_t)((long long)(~0ULL >> 1))) - pos)
signedness error
This happens with GCC 8.1 on x86-64 and GCC 8.5 on arm and s390.
GCC 8.1 remains the minimum supported compiler.
Use umin(), which is intended for comparing an unsigned value with a
signed value that is known to be nonnegative. The preceding bounds check
guarantees that MAX_LFS_FILESIZE - pos is nonnegative, and outarg.size
bounds the result to unsigned int.
Fixes: 25307ca50b815 ("fuse: simplify logic in fuse_notify_store() and fuse_retrieve()")
Cc: stable@vger.kernel.org # v7.1
Assisted-by: Codex:gpt-5.6-sol
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'include/uapi/linux/errqueue.h')
0 files changed, 0 insertions, 0 deletions
