stack/conntrack: suppress the nested locking warning

reapEverything intentionally takes the second bucket lock.

PiperOrigin-RevId: 495967790
This commit is contained in:
Andrei Vagin
2022-12-16 14:59:49 -08:00
committed by gVisor bot
parent a2ff07e535
commit 41009e886e
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -112,6 +112,7 @@ declare_rwmutex(
declare_rwmutex(
name = "bucket_mutex",
out = "bucket_mutex.go",
nested_lock_names = ["otherTuple"],
package = "stack",
prefix = "bucket",
)
+2 -2
View File
@@ -1097,9 +1097,9 @@ func (ct *ConnTrack) reapTupleLocked(reapingTuple *tuple, bktID int, bkt *bucket
bkt.tuples.Remove(otherTuple)
} else {
otherTupleBkt := &ct.buckets[otherTupleBktID]
otherTupleBkt.mu.Lock()
otherTupleBkt.mu.NestedLock(bucketLockOthertuple)
otherTupleBkt.tuples.Remove(otherTuple)
otherTupleBkt.mu.Unlock()
otherTupleBkt.mu.NestedUnlock(bucketLockOthertuple)
}
return true