Sergey Senozhatsky wrote: > such usage is quite possible. > > problems that I have with console_lock()/console_unlock() is that > these functions serve a double purpose: exclusive printk() lock and a > console_drivers list lock.
Yes, I don't like it too. > > **** I haven't really thought about it yet, but I want to split it. **** > Since writing to console does not call schedule(), I think rcu_read_lock()/rcu_read_unlock()/synchronize_rcu() (or synchronize_rcu_*() ?) can manage it without using read_lock_console()/read_unlock_console()/write_lock_console()/write_unlock_console(). Replacing console_lock()/console_unlock() for protecting console_drivers list with RCU might be helpful.

