Re: lock_kernel() & kmalloc - evil together?

From: Jeff V. Merkey (jmerkey@timpanogas.com)
Date: Fri Aug 11 2000 - 17:48:58 EST


Linus Torvalds wrote:
>
> On Fri, 11 Aug 2000, Jeff V. Merkey wrote:
> >
> > Thanks! This is good to know. This means if I use it inside of
> > spinlock_irqsave() outside an interrupt, it will tell me not to context
> > switch .... Need to look at this.
>
> It's wrong.
>
> It _can_ return false positives, but only
> - for a _globally_ disabled irq region
> - and only on SMP.
>
> Basically, the rule is that if you use a global cli/sti region, all bets
> are off.
>
> Spinlocks do not affect the state - not even if they are of the irq-safe
> type.

OK. I probably need to go look at the cli/sti macros to understand how
they annotate this.

:-)

Jeff

>
> Linus
>
> -
> 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/

-
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/



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:26 EST