Nullify our periph pointer in dacleanup to try and catch

race conditions in callbacks/downcalls.
This commit is contained in:
Matt Jacob 2010-04-02 20:08:44 +00:00
parent 87a25418ac
commit b011449011
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=206112

View File

@ -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);