aboutsummaryrefslogtreecommitdiff
path: root/sys/cam
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2017-04-18 21:05:05 +0000
committerConrad Meyer <cem@FreeBSD.org>2017-04-18 21:05:05 +0000
commitac30bca611652243803e1ae68a65f197c85b3988 (patch)
tree7f5fac425a6a23f703969b5d2c136aa7dac80c1b /sys/cam
parent4e261006a1d9307a6ddaceb4051c7f5c33f6a32b (diff)
downloadsrc-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.c3
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;