Re: DAC960 SMP deadlock fix

From: Andi Kleen (ak@suse.de)
Date: Thu Sep 07 2000 - 11:09:40 EST


On Thu, Sep 07, 2000 at 09:00:29AM -0700, Leonard N. Zubkoff wrote:
> WaitQueue_T WaitQueueEntry = { current, NULL };
> add_wait_queue(&Controller->CommandWaitQueue, &WaitQueueEntry);
> current->state = TASK_UNINTERRUPTIBLE;
> spin_unlock(&io_request_lock);
> schedule();
> current->state = TASK_RUNNING;
> remove_wait_queue(&Controller->CommandWaitQueue, &WaitQueueEntry);
> spin_lock_irq(&io_request_lock);
>
> Is the fix simply moving the spin_unlock right before the call to
> add_wait_queue?

When you do that you should probably change it to a spin_unlock_irq()

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Sep 07 2000 - 21:00:30 EST