From: Petr Mladek Date: Mon, 1 Dec 2025 13:17:04 +0000 (+0100) Subject: Merge branch 'rework/write_atomic-unsafe' into for-linus X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5cae92e622300d04ff23cc721dc67d8f5788e51c;p=thirdparty%2Flinux.git Merge branch 'rework/write_atomic-unsafe' into for-linus --- 5cae92e622300d04ff23cc721dc67d8f5788e51c diff --cc kernel/printk/nbcon.c index 0bbb03fde35d7,90412c2b29616..3fa403f9831f0 --- a/kernel/printk/nbcon.c +++ b/kernel/printk/nbcon.c @@@ -1536,12 -1525,12 +1554,12 @@@ static int __nbcon_atomic_flush_pending ctxt->console = con; ctxt->spinwait_max_us = 2000; ctxt->prio = nbcon_get_default_prio(); - ctxt->allow_unsafe_takeover = allow_unsafe_takeover; + ctxt->allow_unsafe_takeover = nbcon_allow_unsafe_takeover(); - if (!nbcon_context_try_acquire(ctxt, false)) - return -EPERM; - while (nbcon_seq_read(con) < stop_seq) { + if (!nbcon_context_try_acquire(ctxt, false)) + return -EPERM; + /* * nbcon_emit_next_record() returns false when the console was * handed over or taken over. In both cases the context is no