From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751069AbdCNI0X (ORCPT ); Tue, 14 Mar 2017 04:26:23 -0400 Received: from LGEAMRELO11.lge.com ([156.147.23.51]:60103 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751163AbdCNI0U (ORCPT ); Tue, 14 Mar 2017 04:26:20 -0400 X-Original-SENDERIP: 156.147.1.127 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 165.244.249.25 X-Original-MAILFROM: byungchul.park@lge.com X-Original-SENDERIP: 10.177.222.33 X-Original-MAILFROM: byungchul.park@lge.com From: Byungchul Park To: , CC: , , , , , , , , , , Subject: [PATCH v6 08/15] lockdep: Fix incorrect condition to print bug msgs for MAX_LOCKDEP_CHAIN_HLOCKS Date: Tue, 14 Mar 2017 17:18:55 +0900 Message-ID: <1489479542-27030-9-git-send-email-byungchul.park@lge.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1489479542-27030-1-git-send-email-byungchul.park@lge.com> References: <1489479542-27030-1-git-send-email-byungchul.park@lge.com> X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB02/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/14 17:19:45, Serialize by Router on LGEKRMHUB02/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/14 17:19:45, Serialize complete at 2017/03/14 17:19:45 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Bug messages and stack dump for MAX_LOCKDEP_CHAIN_HLOCKS should be printed only once. Signed-off-by: Byungchul Park --- kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index c78dd9d..ef26725 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -2267,7 +2267,7 @@ static inline int add_chain_cache(struct task_struct *curr, * Important for check_no_collision(). */ if (unlikely(nr_chain_hlocks > MAX_LOCKDEP_CHAIN_HLOCKS)) { - if (debug_locks_off_graph_unlock()) + if (!debug_locks_off_graph_unlock()) return 0; print_lockdep_off("BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!"); -- 1.9.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f71.google.com (mail-pg0-f71.google.com [74.125.83.71]) by kanga.kvack.org (Postfix) with ESMTP id 575196B038B for ; Tue, 14 Mar 2017 04:26:21 -0400 (EDT) Received: by mail-pg0-f71.google.com with SMTP id j190so337586pgc.4 for ; Tue, 14 Mar 2017 01:26:21 -0700 (PDT) Received: from lgeamrelo11.lge.com (LGEAMRELO11.lge.com. [156.147.23.51]) by mx.google.com with ESMTP id n12si14058977pfa.269.2017.03.14.01.26.18 for ; Tue, 14 Mar 2017 01:26:19 -0700 (PDT) From: Byungchul Park Subject: [PATCH v6 08/15] lockdep: Fix incorrect condition to print bug msgs for MAX_LOCKDEP_CHAIN_HLOCKS Date: Tue, 14 Mar 2017 17:18:55 +0900 Message-ID: <1489479542-27030-9-git-send-email-byungchul.park@lge.com> In-Reply-To: <1489479542-27030-1-git-send-email-byungchul.park@lge.com> References: <1489479542-27030-1-git-send-email-byungchul.park@lge.com> MIME-Version: 1.0 Content-Type: text/plain Sender: owner-linux-mm@kvack.org List-ID: To: peterz@infradead.org, mingo@kernel.org Cc: tglx@linutronix.de, walken@google.com, boqun.feng@gmail.com, kirill@shutemov.name, linux-kernel@vger.kernel.org, linux-mm@kvack.org, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, willy@infradead.org, npiggin@gmail.com, kernel-team@lge.com Bug messages and stack dump for MAX_LOCKDEP_CHAIN_HLOCKS should be printed only once. Signed-off-by: Byungchul Park --- kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index c78dd9d..ef26725 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -2267,7 +2267,7 @@ static inline int add_chain_cache(struct task_struct *curr, * Important for check_no_collision(). */ if (unlikely(nr_chain_hlocks > MAX_LOCKDEP_CHAIN_HLOCKS)) { - if (debug_locks_off_graph_unlock()) + if (!debug_locks_off_graph_unlock()) return 0; print_lockdep_off("BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!"); -- 1.9.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org