Date: Sat, 30 Jan 2021 23:41:03 GMT From: Gordon Bergling <gbe@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 8ce9180c09d9 - stable/11 - kevent(2): Bugfix for wrong EVFILT_TIMER timeouts Message-ID: <202101302341.10UNf3ur095725@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/11 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=8ce9180c09d93b4ef11859be604ef41173d6dbd1 commit 8ce9180c09d93b4ef11859be604ef41173d6dbd1 Author: Jan Kokemüller <jan.kokemueller@gmail.com> AuthorDate: 2021-01-09 19:00:25 +0000 Commit: Gordon Bergling <gbe@FreeBSD.org> CommitDate: 2021-01-30 23:39:58 +0000 kevent(2): Bugfix for wrong EVFILT_TIMER timeouts When using NOTE_NSECONDS in the kevent(2) API, US_TO_SBT should be used instead of NS_TO_SBT, otherwise the timeout results are misleading. PR: 252539 Reviewed by: kevans, kib Approved by: kevans Differential Revision: https://reviews.freebsd.org/D28067 (cherry picked from commit 4d0c33be634a929f323117f04e6b1670776f9e37) (cherry picked from commit 6a3ad2d0a7b633bad2bb33f9c4c426dffcc91633) --- sys/kern/kern_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 16f24e59b73e..004e3e1e436e 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -629,7 +629,7 @@ timer2sbintime(intptr_t data, int flags) if (secs > (SBT_MAX / SBT_1S)) return (SBT_MAX); #endif - return (secs << 32 | US_TO_SBT(data % 1000000000)); + return (secs << 32 | NS_TO_SBT(data % 1000000000)); } return (NS_TO_SBT(data)); default:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101302341.10UNf3ur095725>