VProc child-sibling list race
Roger Tsang <[email protected]> Wed, 4 Nov 2009 06:18:46 +0000
| Newsgroups | gmane.linux.cluster.ssic.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
This bug is either staring right at me or I am just having a bad hair day.
In vpop_wait() we see VPROC LOCK is used to protect its parent-child-sibling
list. However the ND LIST lock doesn't protect PVP(vo)->pvp_childl from
other threads. Also if I am not wrong the for-loop in vpop_wait() is not
SMP-safe since PVP(vc)->pvp_childl is neither protected by VPROC LOCK nor ND
LIST lock.
-Roger
<snip>
VPROC_LOCK_EXCL(vp, "vpop_wait");
<snip>
for (vo = NULL, vc = pvp->pvp_head_childl;
vc != NULL;
vo = vc, vc = PVP(vc)->pvp_childl) {
<snip>
VPROC_LOCK_ND_LIST_EXCL(vp, "vpop_wait");
if (vo == NULL)
pvp->pvp_head_childl =
pvc->pvp_childl;
else
PVP(vo)->pvp_childl =
pvc->pvp_childl;
rmb();
pvc->pvp_childl = NULL;
VPROC_UNLOCK_ND_LIST_EXCL(vp, "vpop_wait");
<snip>
VPROC_UNLOCK_EXCL(vp, "vpop_wait");
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
ssic-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ssic-linux-devel