Date: Tue, 13 Jun 2006 05:04:09 GMT From: Scott Long <scottl@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 99121 for review Message-ID: <200606130504.k5D549NR078259@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=99121 Change 99121 by scottl@scottl-x64 on 2006/06/13 05:03:40 Fix a brain-o with INVARIANTS. The ccb typically gets freed in the periph callback in the camisr, so it can't be deferenced again to get to the mutex pointer. Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#36 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#36 (text+ko) ==== @@ -7182,6 +7182,7 @@ cam_isrq_t queue; int s; struct ccb_hdr *ccb_h; + struct cam_sim *sim; /* * Transfer the ccb_bioq list to a temporary list so we can operate @@ -7198,7 +7199,8 @@ int runq; TAILQ_REMOVE(&queue, ccb_h, sim_links.tqe); - mtx_lock(ccb_h->path->bus->sim->mtx); + sim = ccb_h->path->bus->sim; + mtx_lock(sim->mtx); ccb_h->pinfo.index = CAM_UNQUEUED_INDEX; splx(s); @@ -7288,7 +7290,7 @@ (*ccb_h->cbfcnp)(ccb_h->path->periph, (union ccb *)ccb_h); /* Raise IPL for while test */ - mtx_unlock(ccb_h->path->bus->sim->mtx); + mtx_unlock(sim->mtx); s = splcam(); } splx(s);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606130504.k5D549NR078259>