diff options
author | mjacob <mjacob@FreeBSD.org> | 2010-04-02 20:08:44 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2010-04-02 20:08:44 +0000 |
commit | 4de64106dd619c2617ea88c63727d195031d7479 (patch) | |
tree | 4b112141f9db0fca9d879265c37bc7812a9c3059 | |
parent | e8f045c8eb236a5145ccb0c272dfa534d0acdcec (diff) | |
download | FreeBSD-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.c | 5 |
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); |