HomeFreeBSD

safexcel: Fix a race around unblocking of crypto ops

Description

safexcel: Fix a race around unblocking of crypto ops

safexcel_ring_intr() could fail to observed that sc_blocked is set after
completing all outstanding ops for a ring, in which case blocked ops
would be deferred forever.

Request structures are managed by individual rings, so move the
"blocked" flag into the per-ring state block and use the ring lock to
synchronize with safexcel_process(). Remove sc_mtx since it is now
unused.

MFC after: 3 days
Sponsored by: Rubicon Communications, LLC (Netgate)

Details

Provenance
markjAuthored on Jan 8 2021, 6:32 PM
Parents
rG8ba6acbbe699: safexcel: Stop using a stack buffer for the ring lock name
Branches
Unknown
Tags
Unknown