From 6359a37e432908fe92995aed5c591cf14235131e Mon Sep 17 00:00:00 2001 From: Paul Cacheux Date: Fri, 17 Nov 2023 09:15:49 +0100 Subject: [PATCH] [CWS] clean `pidToMounts` when removing mount (#20906) --- pkg/security/resolvers/mount/resolver.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/security/resolvers/mount/resolver.go b/pkg/security/resolvers/mount/resolver.go index 90ec3005dea66..46891615da5de 100644 --- a/pkg/security/resolvers/mount/resolver.go +++ b/pkg/security/resolvers/mount/resolver.go @@ -174,6 +174,10 @@ func (mr *Resolver) delete(mount *model.Mount) { openQueue = append(openQueue, child) } } + + for _, mounts := range mr.pidToMounts { + delete(mounts, mount.MountID) + } } }