From: Andi Kleen <andi@firstfloor.org>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Andi Kleen <andi@firstfloor.org>, Ingo Molnar <mingo@elte.hu>,
Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: wait_for_completion_interruptible() changes
Date: Thu, 18 Oct 2007 19:41:24 +0200 [thread overview]
Message-ID: <20071018174124.GA30159@one.firstfloor.org> (raw)
In-Reply-To: <Pine.LNX.4.62.0710181850370.22736@pademelon.sonytel.be>
> 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@suse.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);
next prev parent reply other threads:[~2007-10-18 17:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-18 17:05 wait_for_completion_interruptible() changes Geert Uytterhoeven
2007-10-18 17:41 ` Andi Kleen [this message]
2007-10-18 19:20 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071018174124.GA30159@one.firstfloor.org \
--to=andi@firstfloor.org \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox