Re: locking and interrupts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Oct 6, 2009 at 10:03 AM, er krishna <erkrishna@xxxxxxxxx> wrote:
> Dear All,
>
> I have a very basic confusion, please help and confirm the right answer :
>
> If a process/thread (user space/kernel space)  has taken a lock on a
> critical section code, and suddenly an interrupt occurs which want to use
> the same shared data of critical region. Will it able to preempt this code
> which is running in process context ?

Unless interrupts are disabled, yes it can preempt your code.

>
> As per my understanding, although interrupts has higher priority than
> process, but it can't preempt the process  otherwise a major bug can occur (
> depending upon the shared data of critical section). Please confirm my
> understanding weather its true or not ?

Evil draws near , if you don't use proper locking. ([1]).

thanks,
Daniel.

[1] http://www.kernel.org/pub/linux/kernel/people/rusty/kernel-locking/index.html

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux