> From: Denis V. Lunev <[email protected]>
> 
> ve_offline() frees ve->ve_name as soon as the ve cgroup goes offline,
> while the ve itself lives on as long as anything holds a reference, a
> ve namespace for one. Tasks of that namespace still point at the ve,
> and readers of another task's ve name, such as sched_show_task(),
> dereference the string with nothing that keeps it from being freed
> under them. A reference to the ve does not help either, as it does not
> hold the cgroup online.
> 
> Free the name in ve_destroy() instead. That is css_free, which runs
> after an RCU grace period, so the name is valid for as long as the ve
> is and an RCU reader of task_ve() can print it. ve0 is never destroyed
> and keeps its static name. ve_offline() is left empty and goes away.
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-155341
> 
> Feature: ve: ve generic structures
> Suggested-by: Vasileios Almpanis <[email protected]>
> Signed-off-by: Denis V. Lunev <[email protected]>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review ยท 
https://sashiko.vzint.dev/#/patchset/[email protected]?part=2


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

Reply via email to