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] [day] [month] [year] [list]
Date:	Tue, 28 Oct 2008 10:31:21 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	qinghuang feng <qhfeng.kernel@...il.com>
Cc:	sniper <s3c24xx@...il.com>, mingo@...hat.com, peterz@...radead.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] LOCKDEP: minor fix for debug_show_all_locks()


* qinghuang feng <qhfeng.kernel@...il.com> wrote:

> When we failed to get tasklist_lock eventually (count equals 0),
> we should only print " ignoring it.\n", and not print
> " locked it.\n" needlessly.
> 
> Signed-off-by: Qinghuang Feng <qhfeng.kernel@...il.com>
> ---

> diff --git a/kernel/lockdep.c b/kernel/lockdep.c
> index dbda475..6533fd9 100644
> --- a/kernel/lockdep.c
> +++ b/kernel/lockdep.c
> @@ -3417,8 +3417,7 @@ retry:
>  		}
>  		printk(" ignoring it.\n");
>  		unlock = 0;
> -	}
> -	if (count != 10)
> +	} else if (count != 10)
>  		printk(" locked it.\n");
> 

applied to tip/core/urgent, thanks!

note that i've done two small tweaks to the patch:

 - added curly braces to the else branch as well - the convention is 
   to mirror the curly braces of the main branch in such cases.

 - added KERN_CONT for the printk

	Ingo

-------------->
>From 46fec7ac40e452a2ea5e63648d98b6bb2b5898f9 Mon Sep 17 00:00:00 2001
From: qinghuang feng <qhfeng.kernel@...il.com>
Date: Tue, 28 Oct 2008 17:24:28 +0800
Subject: [PATCH] lockdep: minor fix for debug_show_all_locks()

When we failed to get tasklist_lock eventually (count equals 0),
we should only print " ignoring it.\n", and not print
" locked it.\n" needlessly.

Signed-off-by: Qinghuang Feng <qhfeng.kernel@...il.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 kernel/lockdep.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index dbda475..11832ac 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -3417,9 +3417,10 @@ retry:
 		}
 		printk(" ignoring it.\n");
 		unlock = 0;
+	} else {
+		if (count != 10)
+			printk(KERN_CONT " locked it.\n");
 	}
-	if (count != 10)
-		printk(" locked it.\n");
 
 	do_each_thread(g, p) {
 		/*
--
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