lkml.org 
[lkml]   [2020]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -tip 23/32] sched: Add a per-thread core scheduling interface
On Tue, Nov 17, 2020 at 06:19:53PM -0500, Joel Fernandes (Google) wrote:
> +/* Called from prctl interface: PR_SCHED_CORE_SHARE */
> +int sched_core_share_pid(pid_t pid)
> +{
> + struct task_struct *task;
> + int err;
> +
> + if (pid == 0) { /* Recent current task's cookie. */
> + /* Resetting a cookie requires privileges. */
> + if (current->core_task_cookie)
> + if (!capable(CAP_SYS_ADMIN))
> + return -EPERM;

Coding-Style fail.

Also, why?!? I realize it is true for your case, because hardware fail.
But in general this just isn't true. This wants to be some configurable
policy.

\
 
 \ /
  Last update: 2020-11-25 14:11    [W:0.733 / U:3.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site