lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <84ldlwjdmz.fsf@jogness.linutronix.de>
Date: Tue, 30 Sep 2025 15:09:48 +0206
From: John Ogness <john.ogness@...utronix.de>
To: Andrew Murray <amurray@...goodpenguin.co.uk>, Petr Mladek
 <pmladek@...e.com>, Steven Rostedt <rostedt@...dmis.org>, Sergey
 Senozhatsky <senozhatsky@...omium.org>
Cc: linux-kernel@...r.kernel.org, Andrew Murray <amurray@...goodpenguin.co.uk>
Subject: Re: [PATCH v2 3/3] printk: Use console_flush_one_record for legacy
 printer kthread

On 2025-09-27, Andrew Murray <amurray@...goodpenguin.co.uk> wrote:
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index e2c1cacdb4164489c60fe38f1e2837eb838107d6..2c9b9383df76de956a05211537264fd6e06366da 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -3668,17 +3668,29 @@ static bool legacy_kthread_should_wakeup(void)
>  
>  static int legacy_kthread_func(void *unused)
>  {
> -	for (;;) {
> -		wait_event_interruptible(legacy_wait, legacy_kthread_should_wakeup());
> +	bool any_progress;
> +
> +wait_for_event:
> +	wait_event_interruptible(legacy_wait,
> +				 legacy_kthread_should_wakeup());
> +
> +	do {
> +		bool any_usable;
> +		bool handover = false;
> +		u64 next_seq;

Please sort by length. It looks nicer. ;-)

		bool handover = false;
		bool any_usable;
		u64 next_seq;

Note that it is fine that @any_usable is not initialized here because
legacy_kthread_func() does not actually care about this variable.

John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ