Page MenuHomeFreeBSD

kevent: Fix races between timer detach and kqtimer_proc_continue()
ClosedPublic

Authored by markj on Sep 1 2021, 3:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 12, 5:47 PM
Unknown Object (File)
Fri, Jun 12, 4:46 PM
Unknown Object (File)
Wed, Jun 10, 2:51 AM
Unknown Object (File)
Tue, Jun 9, 10:29 AM
Unknown Object (File)
Mon, Jun 8, 11:12 PM
Unknown Object (File)
Mon, Jun 8, 1:45 PM
Unknown Object (File)
Mon, Jun 8, 1:54 AM
Unknown Object (File)
Sun, Jun 7, 7:21 PM
Subscribers

Details

Summary
- When detaching a knote, we need to double check the enqueued flag
  after acquiring the process lock, as kqtimer_proc_continue() may have
  toggled it.
- kqtimer_proc_continue() could in principle reschedule a stopped
  callout after filt_timerdetach() drains the callout.  So, we need to
  re-check.

Reported by: syzbot+4a4cebb3ec07892cb040@syzkaller.appspotmail.com
Reported by: syzbot+a9c04bc76078a3b7dd8d@syzkaller.appspotmail.com

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41310
Build 38199: arc lint + arc unit