Re: [PATCH] Register atomic_notifiers in atomic context

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

 



Alan Stern <[email protected]> wrote:
>
>  The calls to register_cpu_notifier are harder.  That chain really does 
>  need to be blocking

Why?

> which means we can't avoid calling down_write.  The 
>  only solution I can think of is to use down_write_trylock in the 
>  blocking_notifier_chain_register and unregister routines, even though 
>  doing that is a crock.
> 
>  Or else change __down_read and __down_write to use spin_lock_irqsave 
>  instead of spin_lock_irq.  What do you think would be best?

Nothing's pretty.  Perhaps look at system_state and not do any locking at all
in early boot?

>  > I'd suggest that in further development, you enable might_sleep() in early
>  > boot - that would have caught such things..
> 
>  Not a bad idea.  I presume that removing the "system_state == 
>  SYSTEM_RUNNING" test in __might_sleep will have that effect?

Yup.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux