Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a8de508b authored by Suren Baghdasaryan's avatar Suren Baghdasaryan
Browse files

ANDROID: cgroup: Fix for a partially backported patch

The backports of 0d2b5955b36250a9428c832664f2079cbf723bec upstream
commit to 4.14 and 4.19 stable kernels drop changes to
cgroup_pressure_*() functions which breaks PSI cgroup file handlers
in Android Common Kernels.
The partial backport changes cgroup_file_open to allocate struct
cgroup_file_ctx and use kernfs_open_file.priv to point to it while
skipping the accompanying changes in cgroup_pressure_*(). This
leads to cgroup_pressure_*() functions treating kernfs_open_file.priv
as a pointer to struct psi_trigger instead of struct cgroup_file_ctx.
This partial backport works fine in upstream stable kernels because
they are missing PSI feature there, however in Android, PSI is
backported in 4.14 and 4.19 kernels and therefore the missing pieces
result in PSI feature being broken.
Fix this by adding the dropped pieces from the original patch.

Link to the original patch: https://lore.kernel.org/r/20211213191833.916632-3-tj@kernel.org/
Link to the 4.19 backport: https://lore.kernel.org/r/20220414110848.311690316@linuxfoundation.org/



Bug: 233410456
Signed-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
Change-Id: Ib8858fa85a7a1fb82904cea0c8c903fd900d6316
parent 0768ae32
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment