aboutsummaryrefslogtreecommitdiff
path: root/string/Depend
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2026-02-23 14:19:38 +0100
committerFlorian Weimer <fweimer@redhat.com>2026-02-23 14:19:38 +0100
commitb657f72fa34192b9afdd4cfab7fcf8e039d8888c (patch)
tree214b1c21b559023fc7e0f20465fa560b9f06c352 /string/Depend
parent9af18a94e051fce513972254bf97c12ae563841e (diff)
downloadglibc-master.zip
glibc-master.tar.gz
glibc-master.tar.bz2
libio: Fix deadlock between freopen, fflush (NULL) and fclose (bug 24963)HEADmaster
The canonical lock ordering for stream list processing is locking list_all_lock first, then individual streams as needed. The fclose implementation reversed that, and the freopen implementation performed list operations under the reverse order, too. Unlinking in fclose was already unconditional, and the early unlinking looks unnecessary: _IO_file_close_it would call it even for !_IO_IS_FILEBUF streams. There is still a remaining concurrency defect because _IO_new_file_init_internal links in the stream before it is fully initialized, and it is not locked at this point. Reviewed-by: Arjun Shankar <arjun@redhat.com>
Diffstat (limited to 'string/Depend')
0 files changed, 0 insertions, 0 deletions