git: ab7249c288a4 - main - cam: Assert we have the periph lock when updating the iosched stats

From: Warner Losh <imp_at_FreeBSD.org>
Date: Tue, 06 Oct 2026 22:58:53 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=ab7249c288a4d7d09c88f4de705b58a2afbf35f9

commit ab7249c288a4d7d09c88f4de705b58a2afbf35f9
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2026-10-06 22:46:03 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2026-10-06 22:50:38 +0000

    cam: Assert we have the periph lock when updating the iosched stats
    
    Sponsored by:           Netflix
    Differential Revision:  https://reviews.freebsd.org/D60350
---
 sys/cam/cam_iosched.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/cam/cam_iosched.c b/sys/cam/cam_iosched.c
index 822adffc93e5..74e66c6eedda 100644
--- a/sys/cam/cam_iosched.c
+++ b/sys/cam/cam_iosched.c
@@ -1775,7 +1775,9 @@ cam_iosched_bio_update_stats(struct cam_iosched_softc *isc, struct bio *bp,
     union ccb *done_ccb)
 {
 	int retval = 0;
+
 #ifdef CAM_IOSCHED_DYNAMIC
+	cam_periph_assert(isc->periph, MA_OWNED);
 	if (!do_dynamic_iosched)
 		return retval;