Author: cem
Date: Tue Apr 18 21:05:05 2017
New Revision: 317104
URL: https://svnweb.freebsd.org/changeset/base/317104

Log:
  da(4): Fix a TRIM regression introduced in r308155
  
  According to Warner, multiple TRIM BIOs are collapsed into a single CCB with
  NULL bp.  It is invalid to biotrack() NULL, and results in a fault.  So,
  don't do that.
  
  Reported by:  asomers@
  Sponsored by: Dell EMC Isilon

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

Modified: head/sys/cam/scsi/scsi_da.c
==============================================================================
--- head/sys/cam/scsi/scsi_da.c Tue Apr 18 20:31:02 2017        (r317103)
+++ head/sys/cam/scsi/scsi_da.c Tue Apr 18 21:05:05 2017        (r317104)
@@ -4169,7 +4169,8 @@ dadone(struct cam_periph *periph, union 
                        }
                }
 
-               biotrack(bp, __func__);
+               if (bp != NULL)
+                       biotrack(bp, __func__);
                LIST_REMOVE(&done_ccb->ccb_h, periph_links.le);
                if (LIST_EMPTY(&softc->pending_ccbs))
                        softc->flags |= DA_FLAG_WAS_OTAG;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to