Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932529Ab3HGKa1 (ORCPT ); Wed, 7 Aug 2013 06:30:27 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:2456 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S932223Ab3HGKVB (ORCPT ); Wed, 7 Aug 2013 06:21:01 -0400 X-IronPort-AV: E=Sophos;i="4.89,832,1367942400"; d="scan'208";a="8143904" From: Lai Jiangshan To: "Paul E. McKenney" , Steven Rostedt , Peter Zijlstra , linux-kernel@vger.kernel.org Cc: Lai Jiangshan , Dipankar Sarma Subject: [PATCH 1/8] rcu: add a warn to rcu_preempt_note_context_switch() Date: Wed, 7 Aug 2013 18:24:57 +0800 Message-Id: <1375871104-10688-2-git-send-email-laijs@cn.fujitsu.com> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1375871104-10688-1-git-send-email-laijs@cn.fujitsu.com> References: <1375871104-10688-1-git-send-email-laijs@cn.fujitsu.com> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/08/07 18:19:35, Serialize by Router on mailserver/fnst(Release 8.5.3|September 15, 2011) at 2013/08/07 18:19:35, Serialize complete at 2013/08/07 18:19:35 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 965 Lines: 28 It is expected that _nesting == INT_MIN if _nesting < 0. Add a warning to it if something unexpected happen. Signed-off-by: Lai Jiangshan --- kernel/rcutree_plugin.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h index 63098a5..8fd947e 100644 --- a/kernel/rcutree_plugin.h +++ b/kernel/rcutree_plugin.h @@ -243,6 +243,7 @@ static void rcu_preempt_note_context_switch(int cpu) : rnp->gpnum + 1); raw_spin_unlock_irqrestore(&rnp->lock, flags); } else if (t->rcu_read_lock_nesting < 0 && + !WARN_ON_ONCE(t->rcu_read_lock_nesting != INT_MIN) && t->rcu_read_unlock_special) { /* -- 1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/