[Devel] [PATCH] ub: correct _ub_get_css() retvalue for dying/stopped containers

Vasily Averin vvs at virtuozzo.com
Mon Sep 13 13:40:05 MSK 2021


On 9/13/21 12:04 PM, Evgenii Shatokhin wrote:
> On 12.09.2021 18:03, Vasily Averin wrote:
>>   @@ -183,7 +187,11 @@ static __always_inline struct cgroup_subsys_state *__ub_get_css(struct user_bean
>>       if (css)
>>           css_put(css);
>>   -    css_get(root_css);
>> +    if ((ub == &ub0) || (root_css != ub0.ub_bound_css[idx]))
> 
> Is it possible that root_css != ub0.ub_bound_css[idx] at this point? Some kind of race changing ub0.ub_bound_css[idx] under our feet? At the first glance, it seems unlikely.

You are right, this looks incorrect.

Thank you,
	Vasily Averin


More information about the Devel mailing list