[Devel] [PATCH hci-8.1 v6 1/5] ve: Remove STOPPED state
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Mon Nov 16 19:10:55 MSK 2026
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] ve: commit message omits removal of DEAD transition in
ve_destroy()
--
commit 6a34f90f8fbb9ff68c8aa5b754aa9b1d014675fb
Author: Vladimir Riabchun <vladimir.riabchun at virtuozzo.com>
ve: Remove STOPPED state
This commit drops the separate VE_STATE_STOPPED state and moves the VE directly to VE_STATE_DEAD when it is stopped, both on the ve_start_container() error path and in ve_exit_ns().
> diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
> index 6cdfaaa4e703..b3988a8d590f 100644
> --- a/kernel/ve/ve.c
> +++ b/kernel/ve/ve.c
[ ... ]
> @@ -939,7 +939,6 @@ static void ve_destroy(struct cgroup_subsys_state *css)
> ve_free_vdso(ve);
> mntput(ve->devtmpfs_mnt);
> free_percpu(ve->sched_lat_ve.cur);
> - ve_set_state(ve, VE_STATE_DEAD);
> kmem_cache_free(ve_cachep, ve);
> }
[Severity: Low]
The commit message does not mention that this DEAD transition in ve_destroy() is removed. Could it say so, and why it is safe?
The removal looks necessary. DEAD is now set in ve_exit_ns() and in the ve_start_container() error path, so keeping this call would hit the "already DEAD" warning in ve_set_state(). The old call was also a store to an object freed on the next line. As a result, a VE destroyed while still in STARTING never reaches DEAD, which the message could also state.
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261116-ovl-use-orig-ve-v6-0-7cfb41c8c973@virtuozzo.com?part=1
More information about the Devel
mailing list