This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/6932] c->busy can be non-atomic.
- From: "jistone at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 27 Feb 2009 22:04:23 -0000
- Subject: [Bug translator/6932] c->busy can be non-atomic.
- References: <20081001203800.6932.mhiramat@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jistone at redhat dot com 2009-02-27 22:04 -------
(In reply to comment #9)
> Created an attachment (id=3782)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=3782&action=view)
> [PATCH] make busy nonatomic
It should be fine to make this non-atomic, but I think it needs barriers to
preserve memory order. Otherwise the compiler/architecture could reorder the
writes into the context pointer. It might turn into:
1. write some c->fields
>>> interrupt with a probe -> step #1 is overwritten
2. write c->busy = 1
3. write more c->fields, run the probe, etc.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=6932
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.