[PATCH 0/2] Linux: Fix '__close_nocancel_nostatus' clobbering 'errno' [BZ #33035]
Maciej W. Rozycki
macro@orcam.me.uk
Wed Jun 4 18:03:11 GMT 2025
Hi,
This is v2 of the original change, splitting it to two patches so as to
make it feasible to backport a minimal fix, as discussed in the review.
This is a fix for 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 original cover letter follows; see individual changes for further
details.
Spotted while proofreading an upcoming change for `if_nameindex' and
`if_nametoindex' to remove support for obsolete pre-2.1.x Linux versions.
The offending commit was pushed as obvious without a review, which I
suppose contributed to the overlooking of the change to semantics caused.
Then close(2) failures are exceedingly rare where the syscall is made for
a valid file descriptor, so nobody has reported an issue in the field.
Verified with a `powerpc64le-linux-gnu' native configuration and by
inspecting the object code produced for io/close_nocancel_nostatus.o vs
io/close_nocancel.o.
OK to apply?
Previous iterations:
- v1 at: <https://inbox.sourceware.org/libc-alpha/33dd2112-87aa-2e5a-9f6c-e09b1632ef0f@redhat.com/>.
Maciej
More information about the Libc-alpha
mailing list