]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Only assert locked for many async events.
authorimp <imp@FreeBSD.org>
Mon, 5 Nov 2018 18:47:29 +0000 (18:47 +0000)
committerimp <imp@FreeBSD.org>
Mon, 5 Nov 2018 18:47:29 +0000 (18:47 +0000)
commit92253110610c28fc34b45c0c6894294395f480bd
tree15cbf6e9266fafd2957edcfda6de148e4fb730e4
parentdd2dbe2d30e8ad7f86bf0eeac4782e5b28622d3b
Only assert locked for many async events.

Many async events that we see are called for this specific path. When
calling an async callback for a targetted device, XTP will lock that
specific device's path lock (same as what cam_periph_lock does). For
those AC_ events, assert we have the lock rather than trying to
recusrively take it (which causes panics since it's not recursive).

Add annotations about this and about the fact that AC_SCSI_AEN events
are generated now only in the ata stack (which cannot have a scsi_da
attachment). Leave it in place in case I've overlooked something as
the code is harmless.

This is fallout from my attempts to "fix" locking for softc->flags in
r330796 that's not been triggered often enough to get my attention
until now.

Sponsored by: Netflix
MFC After: 3 days
Differential Revision: https://reviews.freebsd.org/D17837
sys/cam/scsi/scsi_da.c