diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-10-29 02:06:29 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-10-29 02:06:29 +0000 |
commit | c32441259d4ae3c7d54e8005d1af8a7f22e942c4 (patch) | |
tree | 90f97da89fc4178277a7d0fffddb46470ab18e9a /pkg/refsvfs2 | |
parent | a50cfffd384c07e11b5d3ad21f3a096bf1ff4521 (diff) | |
parent | 265f1eb2c7abbbf924448ef6bbd8cddb13e66b9f (diff) |
Merge release-20201019.0-96-g265f1eb2c (automated)
Diffstat (limited to 'pkg/refsvfs2')
-rw-r--r-- | pkg/refsvfs2/refs_map.go | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/pkg/refsvfs2/refs_map.go b/pkg/refsvfs2/refs_map.go index 57938d2f0..faf191f39 100644 --- a/pkg/refsvfs2/refs_map.go +++ b/pkg/refsvfs2/refs_map.go @@ -16,16 +16,12 @@ package refsvfs2 import ( "fmt" - "strings" "gvisor.dev/gvisor/pkg/log" refs_vfs1 "gvisor.dev/gvisor/pkg/refs" "gvisor.dev/gvisor/pkg/sync" ) -// TODO(gvisor.dev/issue/1193): re-enable once kernfs refs are fixed. -var ignored []string = []string{"kernfs.", "proc.", "sys.", "devpts.", "fuse."} - var ( // liveObjects is a global map of reference-counted objects. Objects are // inserted when leak check is enabled, and they are removed when they are @@ -60,11 +56,6 @@ func leakCheckEnabled() bool { // Register adds obj to the live object map. func Register(obj CheckedObject) { if leakCheckEnabled() { - for _, str := range ignored { - if strings.Contains(obj.RefType(), str) { - return - } - } liveObjectsMu.Lock() if _, ok := liveObjects[obj]; ok { panic(fmt.Sprintf("Unexpected entry in leak checking map: reference %p already added", obj)) @@ -81,11 +72,6 @@ func Unregister(obj CheckedObject) { liveObjectsMu.Lock() defer liveObjectsMu.Unlock() if _, ok := liveObjects[obj]; !ok { - for _, str := range ignored { - if strings.Contains(obj.RefType(), str) { - return - } - } panic(fmt.Sprintf("Expected to find entry in leak checking map for reference %p", obj)) } delete(liveObjects, obj) |