Skip to content

Commit

Permalink
printk: wake up all waiters
Browse files Browse the repository at this point in the history
There can be multiple tasks waiting for new records. They should
all be woken. Use wake_up_interruptible_all() instead of
wake_up_interruptible().

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20220421212250.565456-5-john.ogness@linutronix.de
  • Loading branch information
John Ogness authored and Petr Mladek committed Apr 22, 2022
1 parent 1f5d783 commit 938ba40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/printk/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -3326,7 +3326,7 @@ static void wake_up_klogd_work_func(struct irq_work *irq_work)
}

if (pending & PRINTK_PENDING_WAKEUP)
wake_up_interruptible(&log_wait);
wake_up_interruptible_all(&log_wait);
}

static DEFINE_PER_CPU(struct irq_work, wake_up_klogd_work) =
Expand Down

0 comments on commit 938ba40

Please sign in to comment.