Re: race conditions

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

 



On Wed, Jun 09, 2004 at 15:30:46 -0700, Greg KH wrote:
> On Thu, Jun 10, 2004 at 12:21:18AM +0200, Jan Hudec wrote:
> > 
> > It is also imperative, that the flags for irqsave/irqrestore live on the
> > stack!
> 
> I don't think this is true anymore for 2.6, but for any previous kernel
> it is true.

Well, it does not have to live on the stack. It never really had to. But
it must be assured, that each pair invoked has it's own flags. And it's
far easiest by using automatic local variable.

As to the definition, it still did not change. It is still:

local_irq_save:
    pushfl
    popl %0
    cli

local_irq_restore:
    pushl %0
    popfl

And spin_lock_irqsave is local_irq_save + spin_lock.

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>

Attachment: signature.asc
Description: Digital signature


[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