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]
Message-ID: <20061211072843.GB31962@elte.hu>
Date:	Mon, 11 Dec 2006 08:28:43 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Jarek Poplawski <jarkao2@...pl>, Andrew Morton <akpm@...l.org>,
	linux-kernel@...r.kernel.org
Subject: [patch] lockdep: fix possible race while disabling lock-debugging, restore fix


* Jarek Poplawski <jarkao2@...pl> wrote:

> ...
> > @@ -1212,7 +1244,8 @@ register_lock_class(struct lockdep_map *
> >  	hash_head = classhashentry(key);
> >  
> >  	raw_local_irq_save(flags);
> > -	__raw_spin_lock(&hash_lock);
> > +	if (!graph_lock())
> 
> 	! raw_local_irq_restore(flags);
> 
> > +		return NULL;

yeah. Fix below.

	Ingo

Subject: [patch] lockdep: fix possible race while disabling lock-debugging, restore fix
From: Ingo Molnar <mingo@...e.hu>

restore flags in failure branch, pointed out by Jarek Poplawski.

Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 kernel/lockdep.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: linux/kernel/lockdep.c
===================================================================
--- linux.orig/kernel/lockdep.c
+++ linux/kernel/lockdep.c
@@ -1244,8 +1244,10 @@ register_lock_class(struct lockdep_map *
 	hash_head = classhashentry(key);
 
 	raw_local_irq_save(flags);
-	if (!graph_lock())
+	if (!graph_lock()) {
+		raw_local_irq_restore(flags);
 		return NULL;
+	}
 	/*
 	 * We have to do the hash-walk again, to avoid races
 	 * with another CPU:
-
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