mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-18 22:19:30 +02:00
Merge tag 'printk-for-7.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux
Pull printk fixes from Petr Mladek: - Use lazy irq_work for waking printk kthreads - Flush pending irq_work before destroying printk kthreads - Remove redundant WARN() when a printk kthread can't be created - Typo fix * tag 'printk-for-7.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printk/nbcon: Change nbcon_irq_work to IRQ_WORK_LAZY printk/nbcon: Flush nbcon_irq_work in nbcon_free() console: fix /dev/kmsg reference in flags kernel doc printk: Don't WARN on kthread_run failure.
This commit is contained in:
@@ -173,7 +173,7 @@ static inline void con_debug_leave(void) { }
|
||||
* @CON_BRL: Indicates a braille device which is exempt from
|
||||
* receiving the printk spam for obvious reasons.
|
||||
* @CON_EXTENDED: The console supports the extended output format of
|
||||
* /dev/kmesg which requires a larger output buffer.
|
||||
* /dev/kmsg which requires a larger output buffer.
|
||||
* @CON_SUSPENDED: Indicates if a console is suspended. If true, the
|
||||
* printing callbacks must not be called.
|
||||
* @CON_NBCON: Console can operate outside of the legacy style console_lock
|
||||
|
||||
@@ -1382,7 +1382,7 @@ bool nbcon_kthread_create(struct console *con)
|
||||
return true;
|
||||
|
||||
kt = kthread_run(nbcon_kthread_func, con, "pr/%s%d", con->name, con->index);
|
||||
if (WARN_ON(IS_ERR(kt))) {
|
||||
if (IS_ERR(kt)) {
|
||||
con_printk(KERN_ERR, con, "failed to start printing thread\n");
|
||||
return false;
|
||||
}
|
||||
@@ -1782,7 +1782,7 @@ bool nbcon_alloc(struct console *con)
|
||||
}
|
||||
|
||||
rcuwait_init(&con->rcuwait);
|
||||
init_irq_work(&con->irq_work, nbcon_irq_work);
|
||||
con->irq_work = IRQ_WORK_INIT_LAZY(nbcon_irq_work);
|
||||
atomic_long_set(&ACCESS_PRIVATE(con, nbcon_prev_seq), -1UL);
|
||||
nbcon_state_set(con, &state);
|
||||
|
||||
@@ -1837,6 +1837,8 @@ void nbcon_free(struct console *con)
|
||||
/* Synchronize the kthread stop. */
|
||||
lockdep_assert_console_list_lock_held();
|
||||
|
||||
irq_work_sync(&con->irq_work);
|
||||
|
||||
if (printk_kthreads_running) {
|
||||
nbcon_kthread_stop(con);
|
||||
|
||||
|
||||
@@ -3732,7 +3732,7 @@ static bool legacy_kthread_create(void)
|
||||
lockdep_assert_console_list_lock_held();
|
||||
|
||||
kt = kthread_run(legacy_kthread_func, NULL, "pr/legacy");
|
||||
if (WARN_ON(IS_ERR(kt))) {
|
||||
if (IS_ERR(kt)) {
|
||||
pr_err("failed to start legacy printing thread\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user