From 270086ec64d8169ed8d20719bca636ea9a1c81f8 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 6 Apr 2003 22:21:03 +0000 Subject: [PATCH] Sufficient access checks are performed by vmapbuf() that calling useracc() is pointless. Remove the calls to useracc(). --- sys/cam/cam_periph.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index 09126e6bed3..d22de048db4 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -605,29 +605,10 @@ cam_periph_mapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo) if (dirs[i] & CAM_DIR_OUT) { flags[i] = BIO_WRITE; - if (!useracc(*data_ptrs[i], lengths[i], - VM_PROT_READ)) { - printf("cam_periph_mapmem: error, " - "address %p, length %lu isn't " - "user accessible for READ\n", - (void *)*data_ptrs[i], - (u_long)lengths[i]); - return(EACCES); - } } if (dirs[i] & CAM_DIR_IN) { flags[i] = BIO_READ; - if (!useracc(*data_ptrs[i], lengths[i], - VM_PROT_WRITE)) { - printf("cam_periph_mapmem: error, " - "address %p, length %lu isn't " - "user accessible for WRITE\n", - (void *)*data_ptrs[i], - (u_long)lengths[i]); - - return(EACCES); - } } }