diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2011-10-13 14:50:02 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2011-10-19 08:36:38 -0500 |
commit | a985ab36e4a1077cd63107f32e336d3e9a725dc1 (patch) | |
tree | a670a049537d57b43ddf38a9c4a8b9e5a284e483 /src/include/kernel | |
parent | 13a27d62ddaae36e7567cbf6504458eb52c68cf5 (diff) | |
download | talos-hostboot-a985ab36e4a1077cd63107f32e336d3e9a725dc1.tar.gz talos-hostboot-a985ab36e4a1077cd63107f32e336d3e9a725dc1.zip |
Fix race condition in stack-segment.
Most interactions with the stack-segment are under the VMM
subsystem where the VMM lock is held. The 'createStack'
function is called by TaskMgr when creating a task and the
VMM lock is not held. Needed to ensure that manipulating
the block list in the stack-segment is spinlock protected.
Change-Id: I0d961661c21cb9c6367eb4f341bf744659fbc7b7
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/441
Tested-by: Jenkins Server
Reviewed-by: MATTHEW S. BARTH <msbarth@us.ibm.com>
Diffstat (limited to 'src/include/kernel')
-rw-r--r-- | src/include/kernel/stacksegment.H | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/kernel/stacksegment.H b/src/include/kernel/stacksegment.H index ec76c194e..2d3474dc6 100644 --- a/src/include/kernel/stacksegment.H +++ b/src/include/kernel/stacksegment.H @@ -29,6 +29,7 @@ #include <kernel/types.h> #include <kernel/segment.H> +#include <kernel/spinlock.H> #include <util/locked/list.H> #include <usr/vmmconst.h> @@ -123,7 +124,8 @@ class StackSegment : public Segment * This list is therefore indexed by the low address of the * range (tid*8MB + 1TB). */ - Util::Locked::List<StackBlockNode, uint64_t> iv_blockList; + Util::Locked::List<StackBlockNode, uint64_t, + true, Spinlock> iv_blockList; /** Internal implementation of init function. */ void _init(); |