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)
Thu, Nov 14, 7:21 AM
Unknown Object (File)
Wed, Nov 13, 10:24 AM
Unknown Object (File)
Wed, Nov 13, 1:32 AM
Unknown Object (File)
Tue, Nov 12, 2:54 PM
Unknown Object (File)
Mon, Nov 11, 2:14 AM
Unknown Object (File)
Oct 20 2024, 12:55 AM
Unknown Object (File)
Oct 6 2024, 6:33 AM
Unknown Object (File)
Sep 26 2024, 11:54 AM
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