mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Sufficient access checks are performed by vmapbuf() that calling useracc()
is pointless. Remove the calls to useracc().
This commit is contained in:
parent
1c62f92354
commit
270086ec64
1 changed files with 0 additions and 19 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue