ve0.css lacked CSS_NO_REF, causing a NULL percpu_ref dereference in css_get() during early boot: net_ns_init() calls get_ve() -> css_get() before cgroup_init() has initialized the reference counter.
Set ve0.css.flags = CSS_NO_REF since ve0 is a permanent singleton that must never be freed. This is consistent with how cgroup_init_subsys() marks all root css objects. Signed-off-by: Eva Kurchatova <[email protected]> https://virtuozzo.atlassian.net/browse/VSTOR-134732 Feature: fix kunit --- kernel/ve/ve.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c index a4d445c80333..a6600eed652b 100644 --- a/kernel/ve/ve.c +++ b/kernel/ve/ve.c @@ -50,6 +50,7 @@ static struct kmem_cache *ve_cachep; static DEFINE_PER_CPU(struct kstat_lat_pcpu_snap_struct, ve0_lat_stats); struct ve_struct ve0 = { + .css = { .flags = CSS_NO_REF }, .ve_name = "0", .start_jiffies = INITIAL_JIFFIES, -- 2.54.0 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
