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)
Tue, Mar 18, 7:32 PM
Unknown Object (File)
Wed, Feb 26, 1:35 PM
Unknown Object (File)
Feb 16 2025, 8:21 PM
Unknown Object (File)
Feb 14 2025, 6:02 PM
Unknown Object (File)
Feb 5 2025, 11:24 PM
Unknown Object (File)
Jan 30 2025, 1:11 PM
Unknown Object (File)
Jan 29 2025, 7:01 PM
Unknown Object (File)
Jan 17 2025, 11:31 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable