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>] [day] [month] [year] [list]
Message-ID: <877d73n3eq.ffs@tglx>
Date:   Mon, 02 May 2022 21:24:45 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Hillf Danton <hdanton@...a.com>
Cc:     Thomas Pfaff <tpfaff@....com>, linux-kernel@...r.kernel.org,
        Marc Zyngier <maz@...nel.org>
Subject: Re: [PATCH v3] irq/core: synchronize irq_thread startup

On Tue, May 03 2022 at 00:01, Hillf Danton wrote:
> On Mon, 02 May 2022 16:28:56 +0200 Thomas Gleixner  wrote:
> --- upstream/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -1258,6 +1258,7 @@ static int irq_thread(void *data)
>  	struct irq_desc *desc = irq_to_desc(action->irq);
>  	irqreturn_t (*handler_fn)(struct irq_desc *desc,
>  			struct irqaction *action);
> +	bool waked = false;
>  
>  	sched_set_fifo(current);
>  
> @@ -1282,8 +1283,11 @@ static int irq_thread(void *data)
>  			irq_wake_secondary(desc, action);
>  
>  		wake_threads_waitq(desc);
> +		waked = true;
>  	}
>  
> +	if (!waked)
> +		wake_threads_waitq(desc);

That's a guarantee to make desc->threads_active go negative in the case
that the thread was never woken by a hard interrupt handler. IOW, you
created a new problem which did not exist before.

The problem discussed here is not a problem in irq_thread(), it's a
problem of not reaching this function in the first place. See the on
point analysis in Thomas Pfaffs patch.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ