summaryrefslogtreecommitdiff
path: root/stdio-common/flockfile.c
diff options
context:
space:
mode:
authorWilco Dijkstra <wilco.dijkstra@arm.com>2022-06-10 13:33:26 +0100
committerWilco Dijkstra <wdijkstr@arm.com>2022-06-10 13:35:57 +0100
commitf107b7b30d815f191181617e2c14f21e6af4ddcf (patch)
tree95574d39cae79a095adb0b08b0f9213c7d51e9ab /stdio-common/flockfile.c
parentcffb9414c55b2e169ed8af1cefd1e3f2ea97e750 (diff)
downloadglibc-f107b7b30d815f191181617e2c14f21e6af4ddcf.tar.gz
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>
Diffstat (limited to 'stdio-common/flockfile.c')
-rw-r--r--stdio-common/flockfile.c1
1 files changed, 0 insertions, 1 deletions
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);