>>>>> [2015-02-25T08:37:59+0530]: "manty kuma" (manty-kuma):
,----[ manty-kuma ]
| What happens if an interrupt comes while in middle of printk execution and
| the interrupt handler has a printk in it?
| 
| There is a chance that the log_buf could be corrupted. isn't it?
`----
no this doesn't happen. look at vprintk_emit(...) which invokes
local_irq_save(...).

essentially, printk tries to acquire console_lock. if it succeeds all is
well. otherwise, output is dumped to a log buffer. when the current
holder of console_lock, unlocks it, log buffer is emptied...

---
thanks
anupam

_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to