lkml.org 
[lkml]   [2014]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3.10] cgroup: break infinite loop in __css_tryget()
Hello, Roman.

On Fri, Nov 28, 2014 at 07:47:54PM +0300, Roman Gushchin wrote:
> If cgroup_destroy_locked() sets the css refcount to a negative value,
> we get an infinite loop in __css_tryget().
>
> In this case css_refcnt() returns modified (non-negative value), so
> both (t == v) and (t < 0) conditions are always false.

I don't follow. The count is biased and modified by unbiasing iff the
value is negative. Here, @v is the unbiased value and @t is the
verbatim value. If @v is different from @t due to unbiasing, @t must
be negative satisfying the second condition and returning NULL, no?

Thanks.

--
tejun


\
 
 \ /
  Last update: 2014-12-02 18:21    [W:0.133 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site