HomeFreeBSD

cam: don't lock while handling an AC_UNIT_ATTENTION

Description

cam: don't lock while handling an AC_UNIT_ATTENTION

Don't take the device_mtx lock in daasync() when handling an
AC_UNIT_ATTENTION. Instead, assert the lock is held before modifying the
periph's softc flags.

The device_mtx lock is taken in xptdevicetraverse() before daasync()
is eventually called in xpt_async_bcast().

PR: 240917, 226510, 226578
Reviewed by: imp
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D27735

(cherry picked from commit bb8441184bab60cd8a07c2b94bd6c4ae8b56ec25)

Details

Provenance
rewAuthored on Jan 4 2022, 1:21 AM
Reviewer
imp
Differential Revision
D27735: cam: don't lock while handling an AC_UNIT_ATTENTION (da)
Parents
rG7205809809e7: syncache: accept packet with no SA when TCP_MD5SIG is set
Branches
Unknown
Tags
Unknown