summaryrefslogtreecommitdiff
path: root/pfinet
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-01-03 13:34:42 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-01-03 13:34:42 +0100
commit1a7e27057ed5974be103c60afecdc8aae691584f (patch)
treeefe0929aead5c3a41f9c43c29fe8da30f9f91d61 /pfinet
parent44a73e25984a2f332d473a8e1187e15bd8774978 (diff)
Fix pfinet crash
During rsyslog testsuite, it does happen that threads running schedule_timeout get woken up by something else than the timer. The (local) timer needs to be removed in that case. Let's just always remove it, like Linux does. * pfinet/glue-include/linux/sched.h (schedule_timeout): Remove local timer before returning.
Diffstat (limited to 'pfinet')
-rw-r--r--pfinet/glue-include/linux/sched.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/pfinet/glue-include/linux/sched.h b/pfinet/glue-include/linux/sched.h
index 5cf2f1b6..e39263e5 100644
--- a/pfinet/glue-include/linux/sched.h
+++ b/pfinet/glue-include/linux/sched.h
@@ -185,6 +185,9 @@ schedule_timeout (long timeout)
else
return 0;
}
+ /* It may happen that we get woken without a signal. Noticed notably during
+ rsyslog testsuite. Make sure we don't leave our timer in. */
+ del_timer(&timer);
return 0;
}