lkml.org 
[lkml]   [2019]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/2] mm: hugetlb: switch to css_tryget() in hugetlb_cgroup_charge_cgroup()
    On Wed, Nov 06, 2019 at 02:51:31PM -0800, Roman Gushchin wrote:
    > An exiting task might belong to an offline cgroup. In this case
    > an attempt to grab a cgroup reference from the task can end up
    > with an infinite loop in hugetlb_cgroup_charge_cgroup(), because
    > neither the cgroup will become online, neither the task will
    > be migrated to a live cgroup.
    >
    > Fix this by switching over to css_tryget(). As css_tryget_online()
    > can't guarantee that the cgroup won't go offline, in most cases
    > the check doesn't make sense. In this particular case users of
    > hugetlb_cgroup_charge_cgroup() are not affected by this change.
    >
    > A similar problem is described by commit 18fa84a2db0e ("cgroup: Use
    > css_tryget() instead of css_tryget_online() in task_get_css()").
    >
    > Signed-off-by: Roman Gushchin <guro@fb.com>
    > Cc: stable@vger.kernel.org
    > Cc: Tejun Heo <tj@kernel.org>

    Acked-by: Tejun Heo <tj@kernel.org>

    Thanks.

    --
    tejun

    \
     
     \ /
      Last update: 2019-11-07 16:44    [W:4.278 / U:0.636 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site