prov/efa: Control plane AV operation locking fix #10823
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
prov/efa: Grab srx lock for control plane AV operations
The srx lock is already used in the data path in both tx and rx
operations. Using the same lock for control plane AV operations
will prevent unsafe access from the control plane.
The util_av code still requires the util_av->lock to be held for some
util_av calls. So grab that lock as well for those calls. This
additional lock will not introduce any extra contention because the srx
lock is already serializing the control plane AV calls.
prov/efa: Rename domain->srx_lock to domain->progress_lock
In addition to the SRX, this lock now protects read and write access to
the AV. Rename it to progress_lock.
This PR fixes some of the unsafe reads in #10804 for the EFA provider