Linus Torvalds writes: (Summary)
For example, you try to handle that nesting with printk_context(), and
nothing when an interrupt happens.
nothing when an interrupt happens.
But that is fundamentally broken.
But that is fundamentally broken.
Just to give an example: what if an interrupt happens, it does this buffering thing, then it gets interrupted by *another* interrupt, and now the printk from that other interrupt gets incorrectly nested together with the first one, because your "printk_context()" gives them the same context?
them the same context?
And it really doesn't have to even be interrupts.
nothing when an interrupt happens.
But that is fundamentally broken.
But that is fundamentally broken.
Just to give an example: what if an interrupt happens, it does this buffering thing, then it gets interrupted by *another* interrupt, and now the printk from that other interrupt gets incorrectly nested together with the first one, because your "printk_context()" gives them the same context?
them the same context?
And it really doesn't have to even be interrupts.