--- linux-2.6.19.1/lib/rwsem-spinlock.c 2006-12-11 19:32:53.000000000 +0000 +++ linux-2.6.19/lib/rwsem-spinlock.c 2006-12-22 15:06:52.000000000 +0000 @@ -129,13 +129,14 @@ { struct rwsem_waiter waiter; struct task_struct *tsk; + unsigned long flags; - spin_lock_irq(&sem->wait_lock); + spin_lock_irqsave(&sem->wait_lock, flags); if (sem->activity >= 0 && list_empty(&sem->wait_list)) { /* granted */ sem->activity++; - spin_unlock_irq(&sem->wait_lock); + spin_unlock_irqrestore(&sem->wait_lock, flags); goto out; } @@ -150,7 +151,7 @@ list_add_tail(&waiter.list, &sem->wait_list); /* we don't need to touch the semaphore struct anymore */ - spin_unlock_irq(&sem->wait_lock); + spin_unlock_irqrestore(&sem->wait_lock, flags); /* wait to be given the lock */ for (;;) {