Messages in this thread | | | From | "Lennert Buytenhek" <> | Subject | Re: [PATCH] i386 rwlock bug? | Date | Sat, 21 Aug 1999 12:40:50 +0200 |
| |
Hi,
>Sorry, here the detailed (and corrected) explanation. You need 2 CPUS. > >CPU1: acquires the lock "READ" from outside an interrupt. interrupts > remain enabled. > >CPU2: disables the local interrupts, and tries to acquire the lock > "WRITE". Since CPU1 owns the lock, it will spin. > >CPU1: an interrupt occurs, and the interrupt handler tries to acquire > the lock "READ". > >This is legal if you use a "strave writer"-policy, but with your change >it is a dead-lock.
Ok, you're totally right here. Sorry. So.... (I'm not aiming this for the kernel or anything, but) if I make my change to write_lock then read locks ought to disable interrupts too? Would this solve the deadlock?
Greetings, Lennert
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |