On Mon, Oct 24, 2016 at 7:08 AM, Sergey Senozhatsky <sergey.senozhat...@gmail.com> wrote: > > is mod_timer() safe enough to rely on/call from > panic()->console_flush_on_panic()->console_unlock() ?
I don't think that's a big issue: the whole "panic()" siotuation is very much about best effort. > shouldn't deferred_cont_flush() be called every time we jump > to `again' label in console_unlock()? actually, I think we should just do it at the end. And your "spinlock bad magic" reports says to me that we should actually delay it even more, and just do it in klogd, to avoid the whole issue with "printk() is used very _very_ early during boot". Because if klogd isn't even running yet, then we clearly don't care about timely flushing to the logs. So here's a new version - TOTALLY UNTESTED! - that removes even more redundant code (all the "test previous record flags" crud - it is not sensible to think that the previous record was what a continuation was all about, since the whole reason the continuation didn't get merged was that something else happened in between). Note the "totally untested" part. It compiles for me. But it may do unspeakably stupid things. Caveat applior. Linus