aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2025-08-01 15:00:25 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2025-08-01 17:43:29 -0300
commit1502c248d58cb99a203731707987a4342926e830 (patch)
tree66ae78bac0c607027a1e54ede6c57413cf7ef580
parent513629b14d43bffd83985ffb9cf10e5599e649d2 (diff)
downloadglibc-release/2.41/master.zip
glibc-release/2.41/master.tar.gz
glibc-release/2.41/master.tar.bz2
nptl: Fix SYSCALL_CANCEL for return values larger than INT_MAX (BZ 33245)release/2.41/master
The SYSCALL_CANCEL calls __syscall_cancel, which in turn calls __internal_syscall_cancel with an 'int' return instead of the expected 'long int'. This causes issues with syscalls that return values larger than INT_MAX, such as copy_file_range [1]. Checked on x86_64-linux-gnu. [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79139 Reviewed-by: Andreas K. Huettel <dilfridge@gentoo.org> (cherry picked from commit 7107bebf19286f42dcb0a97581137a5893c16206)
-rw-r--r--NEWS1
-rw-r--r--nptl/cancellation.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index ae46367..f77d147 100644
--- a/NEWS
+++ b/NEWS
@@ -36,6 +36,7 @@ The following bugs were resolved with this release:
[32994] stdlib: resolve a double lock init issue after fork
[33164] iconv -o should not create executable files
[33185] Fix double-free after allocation failure in regcomp
+ [33245] nptl: nptl: error in internal cancellation syscall handling
Version 2.41
diff --git a/nptl/cancellation.c b/nptl/cancellation.c
index 156e63d..bed0383 100644
--- a/nptl/cancellation.c
+++ b/nptl/cancellation.c
@@ -72,8 +72,8 @@ __syscall_cancel (__syscall_arg_t a1, __syscall_arg_t a2,
__syscall_arg_t a5, __syscall_arg_t a6,
__SYSCALL_CANCEL7_ARG_DEF __syscall_arg_t nr)
{
- int r = __internal_syscall_cancel (a1, a2, a3, a4, a5, a6,
- __SYSCALL_CANCEL7_ARG nr);
+ long int r = __internal_syscall_cancel (a1, a2, a3, a4, a5, a6,
+ __SYSCALL_CANCEL7_ARG nr);
return __glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (r))
? SYSCALL_ERROR_LABEL (INTERNAL_SYSCALL_ERRNO (r))
: r;