Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Amazingly, we've been freeing a handle and then u...



details:   https://anonhg.NetBSD.org/src/rev/c271e8d23b98
branches:  trunk
changeset: 750822:c271e8d23b98
user:      mjacob <mjacob%NetBSD.org@localhost>
date:      Fri Jan 15 20:09:09 2010 +0000

description:
Amazingly, we've been freeing a handle and then using that which it referred
to for years. Bad.

diffstat:

 sys/dev/ic/isp.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r 96941dc67ddf -r c271e8d23b98 sys/dev/ic/isp.c
--- a/sys/dev/ic/isp.c  Fri Jan 15 19:46:35 2010 +0000
+++ b/sys/dev/ic/isp.c  Fri Jan 15 20:09:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp.c,v 1.119 2010/01/05 13:30:10 mbalmer Exp $ */
+/* $NetBSD: isp.c,v 1.120 2010/01/15 20:09:09 mjacob Exp $ */
 /*
  * Machine and OS Independent (well, as best as possible)
  * code for the Qlogic ISP SCSI adapters.
@@ -43,7 +43,7 @@
  */
 #ifdef __NetBSD__
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isp.c,v 1.119 2010/01/05 13:30:10 mbalmer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isp.c,v 1.120 2010/01/15 20:09:09 mjacob Exp $");
 #include <dev/ic/isp_netbsd.h>
 #endif
 #ifdef __FreeBSD__
@@ -5187,7 +5187,6 @@
                        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);
@@ -5323,6 +5322,7 @@
                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)) ||



Home | Main Index | Thread Index | Old Index