summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2010-04-02 20:08:44 +0000
committermjacob <mjacob@FreeBSD.org>2010-04-02 20:08:44 +0000
commit4de64106dd619c2617ea88c63727d195031d7479 (patch)
tree4b112141f9db0fca9d879265c37bc7812a9c3059
parente8f045c8eb236a5145ccb0c272dfa534d0acdcec (diff)
downloadFreeBSD-src-4de64106dd619c2617ea88c63727d195031d7479.zip
FreeBSD-src-4de64106dd619c2617ea88c63727d195031d7479.tar.gz
Nullify our periph pointer in dacleanup to try and catch
race conditions in callbacks/downcalls.
-rw-r--r--sys/cam/scsi/scsi_da.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 77652b2..377275a 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -997,6 +997,11 @@ dacleanup(struct cam_periph *periph)
xpt_print(periph->path, "can't remove sysctl context\n");
}
+ /*
+ * Nullify our periph pointer here to try and catch
+ * race conditions in callbacks/downcalls.
+ */
+ softc->disk->d_drv1 = NULL;
disk_destroy(softc->disk);
callout_drain(&softc->sendordered_c);
free(softc, M_DEVBUF);
OpenPOWER on IntegriCloud