From f107b7b30d815f191181617e2c14f21e6af4ddcf Mon Sep 17 00:00:00 2001 From: Wilco Dijkstra Date: Fri, 10 Jun 2022 13:33:26 +0100 Subject: 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 --- stdio-common/flockfile.c | 1 - 1 file changed, 1 deletion(-) (limited to 'stdio-common') 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); -- cgit 1.4.1