Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jan 2010 20:08:08 +0000 (UTC)
From:      Matt Jacob <mjacob@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r202418 - head/sys/dev/isp
Message-ID:  <201001152008.o0FK88I7077023@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjacob
Date: Fri Jan 15 20:08:08 2010
New Revision: 202418
URL: http://svn.freebsd.org/changeset/base/202418

Log:
  Amazingly we've been freeing a handle and using that which it refers to
  for years. Bad!
  
  MFC after:	1 week

Modified:
  head/sys/dev/isp/isp.c

Modified: head/sys/dev/isp/isp.c
==============================================================================
--- head/sys/dev/isp/isp.c	Fri Jan 15 19:54:12 2010	(r202417)
+++ head/sys/dev/isp/isp.c	Fri Jan 15 20:08:08 2010	(r202418)
@@ -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)) ||



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001152008.o0FK88I7077023>