From 1352c240858520bdf412c7e53b6389cea4c3ee27 Mon Sep 17 00:00:00 2001 From: Namhoon Kim Date: Tue, 25 Apr 2017 08:12:24 -0400 Subject: deadlock patch --- litmus/sched_mc2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/litmus/sched_mc2.c b/litmus/sched_mc2.c index f8ad5c615e5d..864e1b03d924 100644 --- a/litmus/sched_mc2.c +++ b/litmus/sched_mc2.c @@ -148,7 +148,7 @@ asmlinkage long sys_enact_mode(void) } mode_changed = false; if (pending){ //MCR has entered - raw_spin_lock_irqsave(&state->lock,flags); + raw_spin_lock_irqsave(&state->lock, flags); //TRACE_CUR("LOCK_MSG: GLOBAL LOCK\n"); raw_spin_lock(&global_lock); raw_spin_lock(&mode_lock); @@ -602,6 +602,7 @@ static void mc2_update_timer_and_unlock(struct mc2_cpu_state *state) //enum crit_level lv = get_task_crit_level(state->scheduled); struct next_timer_event *event, *next; int reschedule[NR_CPUS]; + unsigned long flags; for (cpus = 0; cpusnext_events, list) { @@ -654,6 +656,7 @@ static void mc2_update_timer_and_unlock(struct mc2_cpu_state *state) * may raise a softirq, which in turn may wake ksoftirqd. */ //TRACE_CUR("LOCK_MSG: GLOBAL UNLOCK\n"); raw_spin_unlock(&global_lock); + local_irq_restore(flags); raw_spin_unlock(&state->lock); if ((update <= now) || reschedule[state->cpu]) { -- cgit v1.2.2