diff options
author | Maciej W. Rozycki <macro@redhat.com> | 2025-06-24 21:17:25 +0100 |
---|---|---|
committer | Maciej W. Rozycki <macro@redhat.com> | 2025-06-24 21:17:25 +0100 |
commit | 3b0d495ac406f14131d299e933b49bfdd02bf626 (patch) | |
tree | bfcad50e601029b3eb6fd8914dbd382744c95fed /sysdeps/unix/sysv/linux | |
parent | db94e6343ad03252a9e59df56614118fb7267ff8 (diff) | |
download | glibc-3b0d495ac406f14131d299e933b49bfdd02bf626.zip glibc-3b0d495ac406f14131d299e933b49bfdd02bf626.tar.gz glibc-3b0d495ac406f14131d299e933b49bfdd02bf626.tar.bz2 |
Linux: Fix '__close_nocancel_nostatus' clobbering 'errno' [BZ #33035]
Fix fallout from commit c181840c93d3 ("Consolidate non cancellable close
call") that caused '__close_nocancel_nostatus' to clobber 'errno' on a
close(2) failure, a 2.27 regression.
The problem came from a rewrite from 'close_not_cancel_no_status' to
'__close_nocancel_nostatus' switching from an inline implementation that
used INTERNAL_SYSCALL macro (which stays away from 'errno') to a call to
'__close_nocancel' function that uses INLINE_SYSCALL_CALL macro (which
does poke at 'errno').
Implement '__close_nocancel_nostatus' in terms of INTERNAL_SYSCALL_CALL
then, which leaves 'errno' intact.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r-- | sysdeps/unix/sysv/linux/not-cancel.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h index ece3297..73761ab 100644 --- a/sysdeps/unix/sysv/linux/not-cancel.h +++ b/sysdeps/unix/sysv/linux/not-cancel.h @@ -73,7 +73,7 @@ hidden_proto (__fcntl64_nocancel) static inline void __close_nocancel_nostatus (int fd) { - __close_nocancel (fd); + INTERNAL_SYSCALL_CALL (close, fd); } /* Non cancellable writev syscall that does not also set errno in case of |