All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lockdep: Fix wrong condition to print bug msgs for MAX_LOCKDEP_CHAIN_HLOCKS
@ 2017-01-13  2:42 Byungchul Park
  2017-02-06  9:41 ` Byungchul Park
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Byungchul Park @ 2017-01-13  2:42 UTC (permalink / raw)
  To: peterz, mingo; +Cc: linux-kernel

Bug messages and stack dump for MAX_LOCKDEP_CHAIN_HLOCKS should be
printed only at the first time.

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
---
 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 f37156f..a143eb4 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -2166,7 +2166,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

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

* Re: [PATCH] lockdep: Fix wrong condition to print bug msgs for MAX_LOCKDEP_CHAIN_HLOCKS
  2017-01-13  2:42 [PATCH] lockdep: Fix wrong condition to print bug msgs for MAX_LOCKDEP_CHAIN_HLOCKS Byungchul Park
@ 2017-02-06  9:41 ` Byungchul Park
  2017-02-06 15:05 ` Peter Zijlstra
  2017-02-10  8:34 ` [tip:locking/core] lockdep: Fix incorrect " tip-bot for Byungchul Park
  2 siblings, 0 replies; 4+ messages in thread
From: Byungchul Park @ 2017-02-06  9:41 UTC (permalink / raw)
  To: peterz, mingo; +Cc: linux-kernel

On Fri, Jan 13, 2017 at 11:42:04AM +0900, Byungchul Park wrote:
> Bug messages and stack dump for MAX_LOCKDEP_CHAIN_HLOCKS should be
> printed only at the first time.

Could you tell me what you think? Am I wrong?

> 
> Signed-off-by: Byungchul Park <byungchul.park@lge.com>
> ---
>  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 f37156f..a143eb4 100644
> --- a/kernel/locking/lockdep.c
> +++ b/kernel/locking/lockdep.c
> @@ -2166,7 +2166,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

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

* Re: [PATCH] lockdep: Fix wrong condition to print bug msgs for MAX_LOCKDEP_CHAIN_HLOCKS
  2017-01-13  2:42 [PATCH] lockdep: Fix wrong condition to print bug msgs for MAX_LOCKDEP_CHAIN_HLOCKS Byungchul Park
  2017-02-06  9:41 ` Byungchul Park
@ 2017-02-06 15:05 ` Peter Zijlstra
  2017-02-10  8:34 ` [tip:locking/core] lockdep: Fix incorrect " tip-bot for Byungchul Park
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Zijlstra @ 2017-02-06 15:05 UTC (permalink / raw)
  To: Byungchul Park; +Cc: mingo, linux-kernel

On Fri, Jan 13, 2017 at 11:42:04AM +0900, Byungchul Park wrote:
> Bug messages and stack dump for MAX_LOCKDEP_CHAIN_HLOCKS should be
> printed only at the first time.
> 
> Signed-off-by: Byungchul Park <byungchul.park@lge.com>

Indeed, thanks!

> ---
>  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 f37156f..a143eb4 100644
> --- a/kernel/locking/lockdep.c
> +++ b/kernel/locking/lockdep.c
> @@ -2166,7 +2166,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
> 

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

* [tip:locking/core] lockdep: Fix incorrect condition to print bug msgs for MAX_LOCKDEP_CHAIN_HLOCKS
  2017-01-13  2:42 [PATCH] lockdep: Fix wrong condition to print bug msgs for MAX_LOCKDEP_CHAIN_HLOCKS Byungchul Park
  2017-02-06  9:41 ` Byungchul Park
  2017-02-06 15:05 ` Peter Zijlstra
@ 2017-02-10  8:34 ` tip-bot for Byungchul Park
  2 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Byungchul Park @ 2017-02-10  8:34 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: torvalds, hpa, tglx, sasha.levin, peterz, linux-kernel, mingo,
	byungchul.park

Commit-ID:  f9af456a61ecfbef8233c5046a9e347c9b98ba05
Gitweb:     http://git.kernel.org/tip/f9af456a61ecfbef8233c5046a9e347c9b98ba05
Author:     Byungchul Park <byungchul.park@lge.com>
AuthorDate: Fri, 13 Jan 2017 11:42:04 +0900
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 10 Feb 2017 09:09:48 +0100

lockdep: Fix incorrect condition to print bug msgs for MAX_LOCKDEP_CHAIN_HLOCKS

Bug messages and stack dump for MAX_LOCKDEP_CHAIN_HLOCKS should only
be printed once.

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1484275324-28192-1-git-send-email-byungchul.park@lge.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 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 7c38f8f..bf60725 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -2203,7 +2203,7 @@ cache_hit:
 	 * 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!");

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

end of thread, other threads:[~2017-02-10  8:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-13  2:42 [PATCH] lockdep: Fix wrong condition to print bug msgs for MAX_LOCKDEP_CHAIN_HLOCKS Byungchul Park
2017-02-06  9:41 ` Byungchul Park
2017-02-06 15:05 ` Peter Zijlstra
2017-02-10  8:34 ` [tip:locking/core] lockdep: Fix incorrect " tip-bot for Byungchul Park

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.