Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Mar 2018 20:23:36 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 226510] panic: Re-refing for reason 5, cnt = 1
Message-ID:  <bug-226510-8-4Gs0tthofa@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-226510-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-226510-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D226510

--- Comment #16 from Warner Losh <imp@FreeBSD.org> ---
It looks like we're not releasing the DA_REF_TUR. We clear it, but don't
release, then see if it is set and clear it and release. This isn't going to
work out too well, so always release when we clear the work flag.


diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 4bcddbb8dff9..beeda8d90f79 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -3114,6 +3114,7 @@ dastart(struct cam_periph *periph, union ccb *start_c=
cb)
                if (bp =3D=3D NULL) {
                        if (cam_iosched_has_work_flags(softc->cam_iosched,
DA_WORK_TUR)) {
                                cam_iosched_clr_work_flags(softc->cam_iosch=
ed,
DA_WORK_TUR);
+                               da_periph_release_locked(periph, DA_REF_TUR=
);
                                scsi_test_unit_ready(&start_ccb->csio,
                                     /*retries*/ da_retry_count,
                                     dadone,
@@ -3139,11 +3140,6 @@ dastart(struct cam_periph *periph, union ccb *start_=
ccb)
                        }
                }

-               if (cam_iosched_has_work_flags(softc->cam_iosched,
DA_WORK_TUR)) {
-                       cam_iosched_clr_work_flags(softc->cam_iosched,
DA_WORK_TUR);
-                       da_periph_release_locked(periph, DA_REF_TUR);
-               }
-
                if ((bp->bio_flags & BIO_ORDERED) !=3D 0 ||
                    (softc->flags & DA_FLAG_NEED_OTAG) !=3D 0) {
                        softc->flags &=3D ~DA_FLAG_NEED_OTAG;

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-226510-8-4Gs0tthofa>