[Devel] Re: [PATCH 1/7] introduce atomic_dec_and_lock_irqsave()

Dipankar Sarma dipankar at in.ibm.com
Wed Aug 30 09:58:51 PDT 2006

On Wed, Aug 30, 2006 at 12:51:28PM +0200, Roman Zippel wrote:
> Hi,
> On Wed, 30 Aug 2006, Oleg Nesterov wrote:
> > > Why does this need protection against interrupts?
> > 
> > uidhash_lock can be taken from irq context. For example, delayed_put_task_struct()
> > does __put_task_struct()->free_uid().
> AFAICT it's called via rcu, does that mean anything released via rcu has 
> to be protected against interrupts?

No. You need protection only if you have are using some 
data that can also be used by the RCU callback. For example,
if your RCU callback just calls kfree(), you don't have to 
do a spin_lock_bh().


More information about the Devel mailing list