Re: [PATCHSET v2] sched/psi: Fix psimon fork deadlock and rtpoll_timer UAF
Matt Fleming <[email protected]> Mon, 13 Jul 2026 14:49:55 +0100
| Newsgroups | dev.linux.lists.sched-ext,org.kernel.vger.cgroups,org.kernel.vger.linux-kernel,org.kernel.vger.stable |
|---|---|
| Message-ID | <alTs1drVX4kb124h@matt-Precision-5490> |
On Sun, Jul 12, 2026 at 07:46:17AM -1000, Tejun Heo wrote: > Hello, > > v2: - Retagged sched/psi (was cgroup) (patch 1). > - Added a fix for a pre-existing rtpoll_timer use-after-free that the > Sashiko AI review flagged on the previous posting (patch 2). > > v1: https://lore.kernel.org/r/[email protected] > > a5b98009f16d ("sched/psi: fix race between file release and pressure > write") made pressure_write() fork the psimon kthread while holding > cgroup_mutex, which deadlocks against the sched_ext enable path blocking > forks before grabbing cgroup_mutex. Patch 1 moves the fork outside > cgroup_mutex. Patch 2 fixes the use-after-free from a schedule attempt > re-arming group->rtpoll_timer behind psi_trigger_destroy() by shutting > down the timer when the group is freed. > > Matt, patch 1 is unchanged from the previous posting except for the > subject prefix, so test results against that posting still apply. I ended up testing both patches. This resolves the issue for me! Thanks, Matt