Information
This is the file you need to patch FreeBSD 7.0-BETA1.5 in order to avoid the immediate problems described in usb/46176:
For more information, please have a look at my original email to the freebsd-usb mailing list. Note that these patches will still leave you with a frozen system after about 1% of all attempts to detach mounted umass devices.The following file contains an updated script and modified patches suitable for the FreeBSD-CURRENT branch after the initial fixes for vfs_bio.c and vfs_mount.c were included. It includes an adjusted patch for the msdosfs_vfsops.c file and a new patch for the scsi_da.c file.
This version of the fix was tested in 1001 attach/detach iterations without any hint of system panic or freezing. Another email to the freebsd-usb mailing list gives some extra background.Also, this third email gives a more technical background for the second patch set.