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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 27 Oct 2009 07:30:43 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Lai Jiangshan <laijs@...fujitsu.com>
Cc:	Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sofirq: make rcu_irq_enter()/rcu_irq_exit() called in
	pairs

On Tue, Oct 27, 2009 at 04:00:11PM +0800, Lai Jiangshan wrote:
> 
> irq_enter() calls rcu_irq_enter() unconditionally,
> the same as irq_exit() calls rcu_irq_exit().
> 
> It does not change the binary because rcu_irq_enter()
> is dummy when !CONFIG_NO_HZ.
> 
> It's just a cleanup.

This does look like a nice cleanup!  I will pull it in and test it.

Yes, it should be provably the same, but RCU has taught me to be quite
paranoid.  ;-)

						Thanx, Paul

> Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
> ---
> diff --git a/kernel/softirq.c b/kernel/softirq.c
> index f8749e5..21939d9 100644
> --- a/kernel/softirq.c
> +++ b/kernel/softirq.c
> @@ -302,9 +302,9 @@ void irq_exit(void)
>  	if (!in_interrupt() && local_softirq_pending())
>  		invoke_softirq();
> 
> +	rcu_irq_exit();
>  #ifdef CONFIG_NO_HZ
>  	/* Make sure that timer wheel updates are propagated */
> -	rcu_irq_exit();
>  	if (idle_cpu(smp_processor_id()) && !in_interrupt() && !need_resched())
>  		tick_nohz_stop_sched_tick(0);
>  #endif
> 
--
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