public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "carlos at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug nptl/14485] File corruption race condition in robust mutex unlocking
Date: Mon, 09 Feb 2015 20:41:00 -0000 [thread overview]
Message-ID: <bug-14485-131-Aj9WCGNVvh@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-14485-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=14485
Carlos O'Donell <carlos at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |carlos at redhat dot com
--- Comment #5 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Rich Felker from comment #3)
> 1. Thread A unlocks the process-shared, robust mutex and is preempted after
> the mutex is removed from the robust list and atomically unlocked, but
> before it's removed from the list_op_pending field of the robust list header.
>
> 2. Thread B locks the mutex, and, knowing by program logic that it's the
> last user of the mutex, unlocks and unmaps it, allocates/maps something else
> that gets assigned the same address as the shared mutex mapping, and then
> exits.
Isn't this undefined behaviour? You have not specified how you established a
happens-after relationship between the destruction of the mutex by Thread B and
the last use by Thread A. In this description you give it would seem to me that
Thread A is still not done, and that the "program logic" from Thread B is
destroying an in-use mutex and that results in undefined behaviour from Thread
A. Thread B fails to establish a happens-after the use of the mutex from Thread
A. If Thread B truly establishes a happens-after the unlock from Thread A, is
there a problem? I don't think there is.
Did I get something wrong Rich?
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2015-02-09 20:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-17 18:52 [Bug nptl/14485] New: " bugdal at aerifal dot cx
2012-08-17 22:34 ` [Bug nptl/14485] " bugdal at aerifal dot cx
2014-06-17 18:35 ` fweimer at redhat dot com
2014-06-25 10:47 ` fweimer at redhat dot com
2014-06-25 15:47 ` bugdal at aerifal dot cx
2015-02-09 0:28 ` mail at nh2 dot me
2015-02-09 20:41 ` carlos at redhat dot com [this message]
2015-02-09 21:13 ` carlos at redhat dot com
2015-02-09 22:51 ` bugdal at aerifal dot cx
2015-02-10 0:18 ` bugdal at aerifal dot cx
2015-02-10 21:57 ` triegel at redhat dot com
2015-02-10 22:17 ` bugdal at aerifal dot cx
2015-08-09 12:29 ` mail at nh2 dot me
2021-10-21 15:42 ` fweimer at redhat dot com
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-14485-131-Aj9WCGNVvh@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=glibc-bugs@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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).