On Thu 2021-02-25 21:24:25, John Ogness wrote: > The kmsg_dumper can be called from any context and CPU, possibly > from multiple CPUs simultaneously. Since the writing of the buffer > can occur from a later scheduled work queue, the oops buffer must > be protected against simultaneous dumping. > > Use an atomic bit to mark when the buffer is protected. Release the > protection in between setting the buffer and the actual writing in > order for a possible panic (immediate write) to be written during > the scheduling of a previous oops (delayed write).
Just to be sure. You did not use spin lock to prevent problems with eventual double unlock in panic(). Do I get it correctly, please? > Signed-off-by: John Ogness <[email protected]> Anyway, it looks good to me. Reviewed-by: Petr Mladek <[email protected]> Best Regards, Petr

