mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
stack/conntrack: suppress the nested locking warning
reapEverything intentionally takes the second bucket lock. PiperOrigin-RevId: 495967790
This commit is contained in:
@@ -112,6 +112,7 @@ declare_rwmutex(
|
||||
declare_rwmutex(
|
||||
name = "bucket_mutex",
|
||||
out = "bucket_mutex.go",
|
||||
nested_lock_names = ["otherTuple"],
|
||||
package = "stack",
|
||||
prefix = "bucket",
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user