mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-01 06:54:58 +00:00
With write operation on psi files replacing old trigger with a new one,
the lifetime of its waitqueue is totally arbitrary. Overwriting an
existing trigger causes its waitqueue to be freed and pending poll()
will stumble on trigger->event_wait which was destroyed.
Fix this by disallowing to redefine an existing psi trigger. If a write
operation is used on a file descriptor with an already existing psi
trigger, the operation will fail with EBUSY error.
Also bypass a check for psi_disabled in the psi_trigger_destroy as the
flag can be flipped after the trigger is created, leading to a memory
leak.
Fixes:
|
||
|---|---|---|
| .. | ||
| cgroup-internal.h | ||
| cgroup-v1.c | ||
| cgroup.c | ||
| cpuset.c | ||
| debug.c | ||
| freezer.c | ||
| legacy_freezer.c | ||
| Makefile | ||
| misc.c | ||
| namespace.c | ||
| pids.c | ||
| rdma.c | ||
| rstat.c | ||