All of lore.kernel.org
 help / color / mirror / Atom feed
* [Adeos-main] [PATCH 1/2] Fix logic in __ipipe_get_task_info
@ 2007-05-25 13:47 Jan Kiszka
  2007-05-27  8:55 ` Philippe Gerum
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2007-05-25 13:47 UTC (permalink / raw)
  To: adeos-main; +Cc: Philippe Gerum


[-- Attachment #1.1: Type: text/plain, Size: 63 bytes --]

That was obviously wrong, causing double acquisitions.

Jan

[-- Attachment #1.2: fix-__ipipe_get_task_info.patch --]
[-- Type: text/plain, Size: 594 bytes --]

---
 kernel/ipipe/tracer.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Index: linux-2.6.20/kernel/ipipe/tracer.c
===================================================================
--- linux-2.6.20.orig/kernel/ipipe/tracer.c
+++ linux-2.6.20/kernel/ipipe/tracer.c
@@ -572,9 +572,10 @@ __ipipe_get_task_info(char *task_info, s
 	int i;
 	int locked = 1;
 
-	if (trylock && !read_trylock(&tasklist_lock))
-		locked = 0;
-	else
+	if (trylock) {
+		if (!read_trylock(&tasklist_lock))
+			locked = 0;
+	} else
 		read_lock(&tasklist_lock);
 
 	if (locked)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

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

end of thread, other threads:[~2007-05-27  8:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-25 13:47 [Adeos-main] [PATCH 1/2] Fix logic in __ipipe_get_task_info Jan Kiszka
2007-05-27  8:55 ` Philippe Gerum

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.