lkml.org 
[lkml]   [2021]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel/sched: Fix sched_fork() access an invalid sched_task_group
Hello,

On Thu, Sep 02, 2021 at 03:42:15PM +0800, Zhang Qiao wrote:
> I checked the code again.
> I don't quite understand what you said, if the child be moved between
> cgroup_post_fork() and sched_post_sched(), what problems might it cause?

cgroup_post_fork() is where the child's creation is committed from cgroup's
POV, so it'd be migrating cgroups before the initial creation is finished.
From glancing, looks like it'll break css_set task counts to begin with.
This violates the basic assumptions and can cause critical failures in
subtle ways. The would replace one subtle race with a possibly worse one.

Thanks.

--
tejun

\
 
 \ /
  Last update: 2021-09-07 19:02    [W:0.077 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site