We can't access periph after ctlfe_free_ccb().

MFC after:	2 weeks
This commit is contained in:
Alexander Motin 2017-02-24 11:25:32 +00:00
parent a504738fac
commit 8d1316f914
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=314200

View File

@ -995,11 +995,13 @@ static void
ctlfe_requeue_ccb(struct cam_periph *periph, union ccb *ccb, int unlock)
{
struct ctlfe_lun_softc *softc;
struct mtx *mtx;
if (periph->flags & CAM_PERIPH_INVALID) {
mtx = cam_periph_mtx(periph);
ctlfe_free_ccb(periph, ccb);
if (unlock)
cam_periph_unlock(periph);
mtx_unlock(mtx);
return;
}
if (unlock)