prevent concurrent map access in ebpf fd install event handler

which presumably could cause havoc
This commit is contained in:
Matthias Radestock
2017-07-10 15:41:00 +01:00
parent 3883d8f1af
commit 15215d0c2c

View File

@@ -180,6 +180,10 @@ func (t *EbpfTracker) handleFdInstall(ev tracer.EventType, pid int, fd int) {
if !ok {
return
}
t.Lock()
defer t.Unlock()
t.openConnections[tuple] = ebpfConnection{
incoming: true,
tuple: tuple,