Page MenuHomeFreeBSD

mpr/mps: Fix a race in diagnostic reset
ClosedPublic

Authored by imp on Jan 24 2022, 8:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 22 2024, 11:19 AM
Unknown Object (File)
Jan 17 2024, 8:35 PM
Unknown Object (File)
Jan 17 2024, 2:11 PM
Unknown Object (File)
Dec 22 2023, 6:20 AM
Unknown Object (File)
Dec 20 2023, 7:46 PM
Unknown Object (File)
Dec 20 2023, 7:04 AM
Unknown Object (File)
Dec 8 2023, 4:59 PM
Unknown Object (File)
Sep 24 2023, 8:56 AM
Subscribers
None

Details

Summary

There's a small race in freezing the simq when performing a diagnostic
reset. During this time, a transaction can slip through and encounter
the target id of 0. If we're still in diagnostic reset when we detect
this, don't say the device isn't there. Instead, freeze the queue and
return a requeue status, similar to what we do when we're resetting
a target and a transaction get here.

Sponsored by: Netflix

Test Plan

This race would be hit in about 1-2% of diagnostic rests, though some scenarios are more likely than others.
A heavily loaded system with a lsiutil induced diag reset would see it, but at a much lower rate.
Some IOC Fault-caused resets would set a hit rate of closer to 10%.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Jan 24 2022, 8:39 PM
imp added reviewers: scottl, ken, mav.

Yes, unfortunately separation of SIM and queue locks created this race window.

This revision is now accepted and ready to land.Jan 25 2022, 2:10 AM
This revision was automatically updated to reflect the committed changes.