Author: mjacob
Date: Fri Apr  2 20:08:44 2010
New Revision: 206112
URL: http://svn.freebsd.org/changeset/base/206112

Log:
  Nullify our periph pointer in dacleanup to try and catch
  race conditions in callbacks/downcalls.

Modified:
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/scsi/scsi_da.c
==============================================================================
--- head/sys/cam/scsi/scsi_da.c Fri Apr  2 18:15:23 2010        (r206111)
+++ head/sys/cam/scsi/scsi_da.c Fri Apr  2 20:08:44 2010        (r206112)
@@ -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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to