Date: Wed, 14 Jun 2006 14:23:57 GMT From: Scott Long <scottl@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 99224 for review Message-ID: <200606141423.k5EENvtU000785@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=99224 Change 99224 by scottl@scottl-x64 on 2006/06/14 14:23:07 Expand the coverage of the SIM lock in xptioctl to protect xpt_path_free. Add a comment explaining why this is done. Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#37 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#37 (text+ko) ==== @@ -1016,6 +1016,12 @@ return(0); } +/* + * Don't automatically grab the xpt softc lock here even though this is going + * through the xpt device. The xpt device is really just a back door for + * accessing other devices and SIMs, so the right thing to do is to grab + * the appropriate SIM lock once the bus/SIM is located. + */ static int xptioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { @@ -1080,10 +1086,10 @@ xpt_merge_ccb(ccb, inccb); ccb->ccb_h.cbfcnp = xptdone; cam_periph_runccb(ccb, NULL, 0, 0, NULL); - CAM_SIM_UNLOCK(bus->sim); bcopy(ccb, inccb, sizeof(union ccb)); xpt_free_path(ccb->ccb_h.path); xpt_free_ccb(ccb); + CAM_SIM_UNLOCK(bus->sim); break; case XPT_DEBUG: {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606141423.k5EENvtU000785>