If we fail to alloc ve_struct, we'll crash here on setting VE state.
Fixes: 666e40b308457 ("ve/cgroups: Drop lock when stopping workqueue to
avoid dead lock")
Signed-off-by: Konstantin Khorenko <[email protected]>
Feature: ve: ve generic structures
---
kernel/ve/ve.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
index 146f7922d4856..1d7e04bb7f3fb 100644
--- a/kernel/ve/ve.c
+++ b/kernel/ve/ve.c
@@ -1028,9 +1028,9 @@ static struct cgroup_subsys_state *ve_create(struct
cgroup_subsys_state *parent_
err_log:
free_percpu(ve->sched_lat_ve.cur);
err_lat:
+ ve_set_state(ve, VE_STATE_DEAD);
kmem_cache_free(ve_cachep, ve);
err_ve:
- ve_set_state(ve, VE_STATE_STOPPED);
return ERR_PTR(err);
}
--
2.43.0
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel