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]
Date:	Thu, 12 Feb 2009 21:24:59 -0200
From:	Arnaldo Carvalho de Melo <acme@...hat.com>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] rt/threadirqs: don't need to save irqs in
	do_hardirq()

Em Thu, Feb 12, 2009 at 07:27:08PM +0100, Frederic Weisbecker escreveu:
> do_hardirq() has only one caller do_irqd() in a path where irq are already
> disabled. So we don't need to save irqs while holding desc->lock
> 
> Replace spin_lock_irqsave by spin_lock.
> 
> Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
> ---
>  kernel/irq/manage.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index ed7c5e3..6e9baf8 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -905,7 +905,7 @@ static void do_hardirq(struct irq_desc *desc)
>  {
>  	unsigned long flags;

Can flags be removed too?
  
> -	spin_lock_irqsave(&desc->lock, flags);
> +	spin_lock(&desc->lock);
>  
>  	if (!(desc->status & IRQ_INPROGRESS))
>  		goto out;
> @@ -921,7 +921,7 @@ static void do_hardirq(struct irq_desc *desc)
>  	else
>  		thread_do_irq(desc);
>   out:
> -	spin_unlock_irqrestore(&desc->lock, flags);
> +	spin_unlock(&desc->lock);
>  
>  	if (waitqueue_active(&desc->wait_for_handler))
>  		wake_up(&desc->wait_for_handler);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ