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
F102514241: D31772.id94508.diff
Wed, Nov 13, 10:24 AM
F102491089: D31772.id.diff
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)
Sun, Oct 20, 12:55 AM
Unknown Object (File)
Oct 6 2024, 6:33 AM
Unknown Object (File)
Sep 26 2024, 11:54 AM
Unknown Object (File)
Sep 21 2024, 6:41 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable