mirror of git://sourceware.org/git/glibc.git
nptl: Fix SYSCALL_CANCEL for return values larger than INT_MAX (BZ 33245)
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>
This commit is contained in:
parent
cf91048748
commit
7107bebf19
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue