Check that the absolute time value for the first timer expiration is
valid. Absolute time values must be in the future (ie. greater than
the current time).

In this test fails, timerlist_add_absolute will set errno to EINVAL
and return -1.

Index: exec/tlist.h
===================================================================
--- exec/tlist.h        (revision 1758)
+++ exec/tlist.h        (working copy)
@@ -119,7 +119,12 @@
                errno = ENOMEM;
                return (-1);
        }
-       
+
+       if (nano_from_epoch < timerlist_nano_from_epoch()) {
+               errno = EINVAL;
+               return (-1);
+       }
+
        timer->nano_from_epoch = nano_from_epoch;
        timer->data = data;
        timer->timer_fn = timer_fn;
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to