diff options
author | Conrad Meyer <cem@FreeBSD.org> | 2017-04-18 21:05:05 +0000 |
---|---|---|
committer | Conrad Meyer <cem@FreeBSD.org> | 2017-04-18 21:05:05 +0000 |
commit | ac30bca611652243803e1ae68a65f197c85b3988 (patch) | |
tree | 7f5fac425a6a23f703969b5d2c136aa7dac80c1b /sys/cam | |
parent | 4e261006a1d9307a6ddaceb4051c7f5c33f6a32b (diff) | |
download | src-ac30bca611652243803e1ae68a65f197c85b3988.tar.gz src-ac30bca611652243803e1ae68a65f197c85b3988.zip |
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
Notes
Notes:
svn path=/head/; revision=317104
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/scsi/scsi_da.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 2162bb914a30..127f740458d9 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -4169,7 +4169,8 @@ dadone(struct cam_periph *periph, union ccb *done_ccb) } } - 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; |