aboutsummaryrefslogtreecommitdiffstats
path: root/litmus
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2010-05-28 10:39:56 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-29 17:26:39 -0400
commit944f051fda9551483399bed556870b0895df1efa (patch)
tree66fd8b2fb9342d4b9022ca7a917ccdcc59fd242b /litmus
parent9039e5f731ca5f9a0c69f8523ccfee044111d2e3 (diff)
Bugfix: 1) incorrect FMLP high prio task tracking and 2) race in print statement
1) High priority task tied to FMLP semaphore in P-EDF scheduling is incorrectly tracked for tasks acquiring the lock without contention. (HP is always set to CPU 0 instead of proper CPU.) 2) Race in a print statement from P-EDF's pi_block() causes NULL pointer dereference.
Diffstat (limited to 'litmus')
-rw-r--r--litmus/fmlp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/litmus/fmlp.c b/litmus/fmlp.c
index d27698a1cb39..03fa7358d5eb 100644
--- a/litmus/fmlp.c
+++ b/litmus/fmlp.c
@@ -180,7 +180,11 @@ static int do_fmlp_down(struct pi_semaphore* sem)
180 suspended = 0; 180 suspended = 0;
181 TRACE_CUR("acquired PI lock %p, no contention\n", sem); 181 TRACE_CUR("acquired PI lock %p, no contention\n", sem);
182 sem->holder = tsk; 182 sem->holder = tsk;
183
184 /* don't know if we're global or partitioned. */
183 sem->hp.task = tsk; 185 sem->hp.task = tsk;
186 sem->hp.cpu_task[get_partition(tsk)] = tsk;
187
184 litmus->inherit_priority(sem, tsk); 188 litmus->inherit_priority(sem, tsk);
185 spin_unlock_irqrestore(&sem->wait.lock, flags); 189 spin_unlock_irqrestore(&sem->wait.lock, flags);
186 } 190 }