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, 28 Feb 2008 10:35:08 +0530
From:	Gautham R Shenoy <ego@...ibm.com>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, hidave.darkstar@...il.com,
	akpm@...ux-foundation.org, fzu@...gehoertderstaat.de,
	mingo@...e.hu, dipankar@...ibm.com, niv@...ibm.com,
	dvhltc@...ibm.com
Subject: Re: [PATCH] Fix hibernate/resume in presence of PREEMPT_RCU and
	hotplug

On Wed, Feb 27, 2008 at 04:21:10PM -0800, Paul E. McKenney wrote:
> Hello!
> 
> This fixes a oops encountered when doing hibernate/resume in presence
> of PREEMPT_RCU.  The problem was that the code failed to disable preemption
> when accessing a per-CPU variable.  This is OK when called from code
> that already has preemption disabled, but such is not the case from
> the suspend/resume code path.

Well, rcu_offline_cpu() is called from the cpu-offline callback path, and
AFAICS, it doesn't disable preemption.

I wonder how we're seeing this only now! Indeed a good catch!

Reviewed-by: Gautham R Shenoy <ego@...ibm.com>

> 
> Reported-by: Dave Young <hidave.darkstar@...il.com>
> Tested-by: Dave Young <hidave.darkstar@...il.com>
> Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> ---
> 
>  rcupreempt.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff -urpNa -X dontdiff linux-2.6.25-rc3/kernel/rcupreempt.c linux-2.6.25-rc3-rcuoffline/kernel/rcupreempt.c
> --- linux-2.6.25-rc3/kernel/rcupreempt.c	2008-02-26 16:58:43.000000000 -0800
> +++ linux-2.6.25-rc3-rcuoffline/kernel/rcupreempt.c	2008-02-26 17:04:17.000000000 -0800
> @@ -702,8 +702,9 @@ void rcu_offline_cpu(int cpu)
>  	 * fix.
>  	 */
> 
> +	local_irq_save(flags);
>  	rdp = RCU_DATA_ME();
> -	spin_lock_irqsave(&rdp->lock, flags);
> +	spin_lock(&rdp->lock);
>  	*rdp->nexttail = list;
>  	if (list)
>  		rdp->nexttail = tail;

-- 
Thanks and Regards
gautham
--
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