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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 18 Oct 2007 19:41:24 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>
Cc:	Andi Kleen <andi@...stfloor.org>, Ingo Molnar <mingo@...e.hu>,
	Linux Kernel Development <linux-kernel@...r.kernel.org>
Subject: Re: wait_for_completion_interruptible() changes

> I suspect this is caused by the recent completion refactoring?
 
Yes. Here's a patch to fix it.

Fix return value of wait_for_completion_interruptible()

The recent w_f_c() changes broke the return value of 
wait_for_completion_interruptible(). Previously it returned 0 on success,
now -1. Fix that.

Problem found by Geert Uytterhoeven

Signed-off-by: Andi Kleen <ak@...e.de>

Index: linux/kernel/sched.c
===================================================================
--- linux/kernel/sched.c
+++ linux/kernel/sched.c
@@ -3751,7 +3751,10 @@ EXPORT_SYMBOL(wait_for_completion_timeou
 
 int __sched wait_for_completion_interruptible(struct completion *x)
 {
-	return wait_for_common(x, MAX_SCHEDULE_TIMEOUT, TASK_INTERRUPTIBLE);
+	long t = wait_for_common(x, MAX_SCHEDULE_TIMEOUT, TASK_INTERRUPTIBLE);
+	if (t == -ERESTARTSYS) 
+		return t;
+	return 0;
 }
 EXPORT_SYMBOL(wait_for_completion_interruptible);
 
-
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