Module: xenomai-3 Branch: stable-3.0.x Commit: 981af318f0b99e28b17f39239eced78d06eaa22f URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=981af318f0b99e28b17f39239eced78d06eaa22f
Author: Philippe Gerum <[email protected]> Date: Wed Jan 24 11:04:42 2018 +0100 cobalt/rtdm: select: fix timeout sanity check --- kernel/cobalt/posix/io.c | 2 +- kernel/cobalt/posix/syscall32.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/cobalt/posix/io.c b/kernel/cobalt/posix/io.c index d2a84e2..ece7877 100644 --- a/kernel/cobalt/posix/io.c +++ b/kernel/cobalt/posix/io.c @@ -213,7 +213,7 @@ COBALT_SYSCALL(select, primary, || cobalt_copy_from_user(&tv, u_tv, sizeof(tv))) return -EFAULT; - if (tv.tv_usec > 1000000) + if (tv.tv_usec >= 1000000) return -EINVAL; timeout = clock_get_ticks(CLOCK_MONOTONIC) + tv2ns(&tv); diff --git a/kernel/cobalt/posix/syscall32.c b/kernel/cobalt/posix/syscall32.c index bc8b9d9..e79173e 100644 --- a/kernel/cobalt/posix/syscall32.c +++ b/kernel/cobalt/posix/syscall32.c @@ -701,7 +701,7 @@ COBALT_SYSCALL32emu(select, nonrestartable, if (err) return err; - if (tv.tv_usec > 1000000) + if (tv.tv_usec >= 1000000) return -EINVAL; timeout = clock_get_ticks(CLOCK_MONOTONIC) + tv2ns(&tv); _______________________________________________ Xenomai-git mailing list [email protected] https://xenomai.org/mailman/listinfo/xenomai-git
