Date: Tue, 24 May 2022 18:00:09 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 264131] 2nd and subsequent events on a repeating EVFILT_TIMER are delivered with twice the requested timer period Message-ID: <bug-264131-227-VcJnu7ISsT@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-264131-227@https.bugs.freebsd.org/bugzilla/> References: <bug-264131-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264131 Mark Johnston <markj@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open CC| |markj@FreeBSD.org --- Comment #1 from Mark Johnston <markj@FreeBSD.org> --- Thanks for the report and test program. It looks like this is a regression from commit 7cb40543e964. This patch fixes the problem for me but needs mo= re thought: diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 33607fe8c5f4..f1ee8de4e7ee 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -739,7 +739,7 @@ filt_timerexpire_l(struct knote *kn, bool proc_locked) if (delta =3D=3D 0) delta =3D 1; kn->kn_data +=3D delta; - kc->next +=3D (delta + 1) * kc->to; + kc->next +=3D delta * kc->to; if (now >=3D kc->next) /* overflow */ kc->next =3D now + kc->to; KNOTE_ACTIVATE(kn, 0); /* XXX - handle locking */ --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-264131-227-VcJnu7ISsT>