linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH tip/core/rcu] Introduce check for callback list/count mismatch
@ 2012-07-05 22:33 Paul E. McKenney
  2012-07-05 22:55 ` Josh Triplett
  0 siblings, 1 reply; 2+ messages in thread
From: Paul E. McKenney @ 2012-07-05 22:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, niv, tglx,
	peterz, rostedt, Valdis.Kletnieks, dhowells, eric.dumazet,
	darren, fweisbec, sbw, patches

The recent bug that introduced the RCU callback list/count mismatch
showed the need for a diagnostic to check for this, which this patch
adds.

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 95c7b61..4154c95 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -1612,6 +1612,7 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp)
 		rdp->n_force_qs_snap = rsp->n_force_qs;
 	} else if (rdp->qlen < rdp->qlen_last_fqs_check - qhimark)
 		rdp->qlen_last_fqs_check = rdp->qlen;
+	WARN_ON_ONCE((rdp->nxtlist == NULL) != (rdp->qlen == 0));
 
 	local_irq_restore(flags);
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH tip/core/rcu] Introduce check for callback list/count mismatch
  2012-07-05 22:33 [PATCH tip/core/rcu] Introduce check for callback list/count mismatch Paul E. McKenney
@ 2012-07-05 22:55 ` Josh Triplett
  0 siblings, 0 replies; 2+ messages in thread
From: Josh Triplett @ 2012-07-05 22:55 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: linux-kernel, mingo, laijs, dipankar, akpm, mathieu.desnoyers,
	niv, tglx, peterz, rostedt, Valdis.Kletnieks, dhowells,
	eric.dumazet, darren, fweisbec, sbw, patches

On Thu, Jul 05, 2012 at 03:33:19PM -0700, Paul E. McKenney wrote:
> The recent bug that introduced the RCU callback list/count mismatch
> showed the need for a diagnostic to check for this, which this patch
> adds.
> 
> Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

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

> diff --git a/kernel/rcutree.c b/kernel/rcutree.c
> index 95c7b61..4154c95 100644
> --- a/kernel/rcutree.c
> +++ b/kernel/rcutree.c
> @@ -1612,6 +1612,7 @@ static void rcu_do_batch(struct rcu_state *rsp, struct rcu_data *rdp)
>  		rdp->n_force_qs_snap = rsp->n_force_qs;
>  	} else if (rdp->qlen < rdp->qlen_last_fqs_check - qhimark)
>  		rdp->qlen_last_fqs_check = rdp->qlen;
> +	WARN_ON_ONCE((rdp->nxtlist == NULL) != (rdp->qlen == 0));
>  
>  	local_irq_restore(flags);
>  
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-05 22:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-05 22:33 [PATCH tip/core/rcu] Introduce check for callback list/count mismatch Paul E. McKenney
2012-07-05 22:55 ` Josh Triplett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).