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 <[email protected]>

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/[email protected]?part=1

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to