I am reading Operating System Concepts (Silberschatz,Galvin,Gagne), 6th edition, chapter 20. I understand that Linux kernel code is non preemptible (before 2.6 version). But it can be interrupted by hardware interrupts. What happens if the kernel was in the middle of a critical section and the interrupt occured and it too executed the critical section?
From what I read in the book:
The second protection scheme that Linux uses applies to critical sections that occur in the interrupt service routines. The basic tool is the processor interrupt control hardware...
Ok, this scheme is used when an ISR has a critical section. But it will only disble further interrupts. What about the kernel code which was interrupted by this interrupt in the first place?