Destroy Kernel.mf on kernel release.

Otherwise after restore when the old kernel is replaced, we were leaking its
MemoryFile resources when the old kernel was released.

PiperOrigin-RevId: 644777850
This commit is contained in:
Ayush Ranjan
2024-06-19 10:27:07 -07:00
committed by gVisor bot
parent 75c9597d8e
commit b042a85d1a
+1
View File
@@ -1918,6 +1918,7 @@ func (k *Kernel) Release() {
k.rootIPCNamespace.DecRef(ctx)
k.rootUTSNamespace.DecRef(ctx)
k.cleaupDevGofers()
k.mf.Destroy()
}
// PopulateNewCgroupHierarchy moves all tasks into a newly created cgroup