qos: Don't allow userspace to impose restrictions on CPU idle levels
Giving userspace intimate control over CPU latency requirements is nonsense. Userspace can't even stop itself from being preempted, so there's no reason for it to have access to a mechanism primarily used to eliminate CPU delays on the order of microseconds. Remove userspace's ability to send pm_qos requests so that it can't hurt power consumption. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com> Signed-off-by: Panchajanya1999 <kernel@panchajanya.dev>
This commit is contained in:
parent
74cbd01416
commit
25da1fb9b2
1 changed files with 3 additions and 0 deletions
|
@ -380,6 +380,9 @@ static ssize_t cpu_latency_qos_write(struct file *filp, const char __user *buf,
|
|||
{
|
||||
s32 value;
|
||||
|
||||
/* Don't let userspace impose restrictions on CPU idle levels */
|
||||
return count;
|
||||
|
||||
if (count == sizeof(s32)) {
|
||||
if (copy_from_user(&value, buf, sizeof(s32)))
|
||||
return -EFAULT;
|
||||
|
|
Loading…
Reference in a new issue