From: Andre Noll Date: Tue, 15 Mar 2011 21:05:24 +0000 (+0100) Subject: sched: Only call post_select() if task is not in error state. X-Git-Tag: v0.4.6~7^2 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=886c74b9356c905b528d51ac6ab1628496caf3f0;p=paraslash.git sched: Only call post_select() if task is not in error state. Fixes a bug introduced in 86611501 which caused para_audiod to segfault if the connection to para_server terminated unexpectedly. para_audiod relies (in kill_btrn()) on a task's ->post_select method never being called if t->error is negative. --- diff --git a/sched.c b/sched.c index 4e989d34..9be3a2e8 100644 --- a/sched.c +++ b/sched.c @@ -93,7 +93,8 @@ static void sched_post_select(struct sched *s) struct task *t, *tmp; list_for_each_entry_safe(t, tmp, &post_select_list, post_select_node) { - call_post_select(s, t); + if (t->error >= 0) + call_post_select(s, t); // PARA_INFO_LOG("%s: %d\n", t->status, t->ret); if (t->error >= 0) continue;