From 6f0cf58bd4ad9308502d67c772aeb20220970936 Mon Sep 17 00:00:00 2001 From: mjacob Date: Fri, 15 Jan 2010 20:08:08 +0000 Subject: Amazingly we've been freeing a handle and using that which it refers to for years. Bad! MFC after: 1 week --- sys/dev/isp/isp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/dev/isp') diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index 7ea8274..3f22d72 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -5185,7 +5185,6 @@ again: ISP_WRITE(isp, isp->isp_respoutrp, optr); continue; } - isp_destroy_handle(isp, sp->req_handle); if (req_status_flags & RQSTF_BUS_RESET) { XS_SETERR(xs, HBA_BUSRESET); ISP_SET_SENDMARKER(isp, XS_CHANNEL(xs), 1); @@ -5321,6 +5320,7 @@ again: if (XS_XFRLEN(xs)) { ISP_DMAFREE(isp, xs, sp->req_handle); } + isp_destroy_handle(isp, sp->req_handle); if (((isp->isp_dblev & (ISP_LOGDEBUG1|ISP_LOGDEBUG2|ISP_LOGDEBUG3))) || ((isp->isp_dblev & ISP_LOGDEBUG0) && ((!XS_NOERR(xs)) || -- cgit v1.1