Skip to content

v1.0.8

Choose a tag to compare

@github-actions github-actions released this 27 Feb 10:43
· 24 commits to master since this release
fix: let fsnotify_destroy_group handle mark cleanup to fix race

Previous attempts using flush_workqueue(system_unbound_wq) all failed
because fsnotify_mark_destroy_workfn is queued as a DELAYED work via
queue_delayed_work().  flush_workqueue() does NOT flush delayed works
that haven't expired, so the workfn always races with group freeing.

The correct fix: stop manually destroying marks (fsnotify_destroy_mark
+ fsnotify_put_mark).  Instead, just drop our extra mark reference and
let fsnotify_destroy_group() handle everything internally.  It calls:
  1. fsnotify_clear_marks_by_group — detaches and frees all marks
  2. fsnotify_wait_marks_destroyed — flush_delayed_work(&reaper_work)
  3. fsnotify_put_group — safe to free group, no pending async work

This is the same pattern used by inotify, fanotify, and all other
fsnotify consumers in the kernel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>