svn commit: r248501 - head/sys/cam
Konstantin Belousov
kib at FreeBSD.org
Tue Mar 19 13:10:15 UTC 2013
Author: kib
Date: Tue Mar 19 13:10:14 2013
New Revision: 248501
URL: http://svnweb.freebsd.org/changeset/base/248501
Log:
Assert that a ccb passed to cam_periph_mapmem() for XPT_SCSI_IO and
XPT_ATA_IO holds virtual buffer address.
Sponsored by: The FreeBSD Foundation
Tested by: pho
Modified:
head/sys/cam/cam_periph.c
Modified: head/sys/cam/cam_periph.c
==============================================================================
--- head/sys/cam/cam_periph.c Tue Mar 19 13:06:11 2013 (r248500)
+++ head/sys/cam/cam_periph.c Tue Mar 19 13:10:14 2013 (r248501)
@@ -734,6 +734,8 @@ cam_periph_mapmem(union ccb *ccb, struct
case XPT_CONT_TARGET_IO:
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_NONE)
return(0);
+ KASSERT((ccb->ccb_h.flags & CAM_DATA_MASK) == CAM_DATA_VADDR,
+ ("not VADDR for SCSI_IO %p %x\n", ccb, ccb->ccb_h.flags));
data_ptrs[0] = &ccb->csio.data_ptr;
lengths[0] = ccb->csio.dxfer_len;
@@ -743,6 +745,8 @@ cam_periph_mapmem(union ccb *ccb, struct
case XPT_ATA_IO:
if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_NONE)
return(0);
+ KASSERT((ccb->ccb_h.flags & CAM_DATA_MASK) == CAM_DATA_VADDR,
+ ("not VADDR for ATA_IO %p %x\n", ccb, ccb->ccb_h.flags));
data_ptrs[0] = &ccb->ataio.data_ptr;
lengths[0] = ccb->ataio.dxfer_len;
More information about the svn-src-head
mailing list