public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] libio: Avoid RMW of flags2 outside lock (BZ #27842)
@ 2022-06-10 12:38 Wilco Dijkstra
0 siblings, 0 replies; only message in thread
From: Wilco Dijkstra @ 2022-06-10 12:38 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f107b7b30d815f191181617e2c14f21e6af4ddcf
commit f107b7b30d815f191181617e2c14f21e6af4ddcf
Author: Wilco Dijkstra <wilco.dijkstra@arm.com>
Date: Fri Jun 10 13:33:26 2022 +0100
libio: Avoid RMW of flags2 outside lock (BZ #27842)
Remove an unconditional RMW on flags2 in flockfile - we don't need to change
_IO_FLAGS2_NEED_LOCK since it isn't used in flockfile or funlockfile.
This fixes BZ #27842.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diff:
---
stdio-common/flockfile.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/stdio-common/flockfile.c b/stdio-common/flockfile.c
index a5decb450f..49f72c69ab 100644
--- a/stdio-common/flockfile.c
+++ b/stdio-common/flockfile.c
@@ -22,7 +22,6 @@
void
__flockfile (FILE *stream)
{
- stream->_flags2 |= _IO_FLAGS2_NEED_LOCK;
_IO_lock_lock (*stream->_lock);
}
weak_alias (__flockfile, flockfile);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-10 12:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-10 12:38 [glibc] libio: Avoid RMW of flags2 outside lock (BZ #27842) Wilco Dijkstra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).