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: <20120903094203.GH5574@leaf>
Date:	Mon, 3 Sep 2012 02:42:03 -0700
From:	Josh Triplett <josh@...htriplett.org>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
	dipankar@...ibm.com, akpm@...ux-foundation.org,
	mathieu.desnoyers@...ymtl.ca, niv@...ibm.com, tglx@...utronix.de,
	peterz@...radead.org, rostedt@...dmis.org, Valdis.Kletnieks@...edu,
	dhowells@...hat.com, eric.dumazet@...il.com, darren@...art.com,
	fweisbec@...il.com, sbw@....edu, patches@...aro.org
Subject: Re: [PATCH tip/core/rcu 19/23] rcu: Adjust for unconditional
 ->completed assignment

On Thu, Aug 30, 2012 at 11:18:34AM -0700, Paul E. McKenney wrote:
> From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
> 
> Now that the rcu_node structures' ->completed fields are unconditionally
> assigned at grace-period cleanup time, they should already have the
> correct value for the new grace period at grace-period initialization
> time.  This commit therefore inserts a WARN_ON_ONCE() to verify this
> invariant.
> 
> Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>

Reviewed-by: Josh Triplett <josh@...htriplett.org>

>  kernel/rcutree.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/kernel/rcutree.c b/kernel/rcutree.c
> index 1373388..86903df 100644
> --- a/kernel/rcutree.c
> +++ b/kernel/rcutree.c
> @@ -1098,6 +1098,7 @@ static int rcu_gp_init(struct rcu_state *rsp)
>  		rcu_preempt_check_blocked_tasks(rnp);
>  		rnp->qsmask = rnp->qsmaskinit;
>  		rnp->gpnum = rsp->gpnum;
> +		WARN_ON_ONCE(rnp->completed != rsp->completed);
>  		rnp->completed = rsp->completed;
>  		if (rnp == rdp->mynode)
>  			rcu_start_gp_per_cpu(rsp, rnp, rdp);
> @@ -2795,7 +2796,8 @@ static void __init rcu_init_one(struct rcu_state *rsp,
>  			raw_spin_lock_init(&rnp->fqslock);
>  			lockdep_set_class_and_name(&rnp->fqslock,
>  						   &rcu_fqs_class[i], fqs[i]);
> -			rnp->gpnum = 0;
> +			rnp->gpnum = rsp->gpnum;
> +			rnp->completed = rsp->completed;
>  			rnp->qsmask = 0;
>  			rnp->qsmaskinit = 0;
>  			rnp->grplo = j * cpustride;
> -- 
> 1.7.8
> 
--
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