Skip to content

v1.0.5

Choose a tag to compare

@github-actions github-actions released this 27 Feb 08:53
· 24 commits to master since this release
kernel: flush delayed fput before freeing module to fix kworker crash

When a process exits while holding file-wrapper fds, fput() cannot use
task_work (the task is dying) and falls back to the system workqueue
(delayed_fput). The deferred __fput runs in a kworker and calls
f_op->release which points to module code. If rmmod frees the module
before this kworker runs, we get a fatal page fault in kworker context.

Fix: flush system_wq at the start and end of kernelsu_exit() so all
pending __fput callbacks execute while module code is still in memory.

Crash signature: kworker/u16:2, do_bad_area -> die_kernel_fault -> panic

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