public inbox for
help / color / mirror / Atom feed
From: Wilco Dijkstra <>
Subject: [glibc] libio: Avoid RMW of flags2 outside lock (BZ #27842)
Date: Fri, 10 Jun 2022 12:38:22 +0000 (GMT)	[thread overview]
Message-ID: <> (raw);h=f107b7b30d815f191181617e2c14f21e6af4ddcf

commit f107b7b30d815f191181617e2c14f21e6af4ddcf
Author: Wilco Dijkstra <>
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  <>

 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 @@
 __flockfile (FILE *stream)
-  stream->_flags2 |= _IO_FLAGS2_NEED_LOCK;
   _IO_lock_lock (*stream->_lock);
 weak_alias (__flockfile, flockfile);

                 reply	other threads:[~2022-06-10 12:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).