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

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

UPSTREAM: sched/psi: Do not require setsched permission from the trigger creator



When a process creates a new trigger by writing into /proc/pressure/*
files, permissions to write such a file should be used to determine whether
the process is allowed to do so or not. Current implementation would also
require such a process to have setsched capability. Setting of psi trigger
thread's scheduling policy is an implementation detail and should not be
exposed to the user level. Remove the permission check by using _nocheck
version of the function.

Suggested-by: default avatarNick Kralevich <nnk@google.com>
Signed-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: lizefan@huawei.com
Cc: mingo@redhat.com
Cc: akpm@linux-foundation.org
Cc: kernel-team@android.com
Cc: dennisszhou@gmail.com
Cc: dennis@kernel.org
Cc: hannes@cmpxchg.org
Cc: axboe@kernel.dk
Link: https://lkml.kernel.org/r/20190730013310.162367-1-surenb@google.com



(cherry picked from commit 04e048cf09d7b5fc995817cdc5ae1acd4482429c)

Bug: 131761776
Test: lmkd_unit_test and ACT mempressure tests
Change-Id: I37737e85611bb742d61a6988132856726bef9a1f
Signed-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
parent 06c14d4a
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