Remove stale comment
There's no useracc here, and even if there was it shouldn't be here. vmapbuf is sufficient and as the comment says, useracc is racy.
This commit is contained in:
@@ -971,14 +971,7 @@ cam_periph_mapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo,
|
||||
mapinfo->bp[i]->b_iocmd = (dirs[i] == CAM_DIR_OUT) ?
|
||||
BIO_WRITE : BIO_READ;
|
||||
|
||||
/*
|
||||
* Map the buffer into kernel memory.
|
||||
*
|
||||
* Note that useracc() alone is not a sufficient test.
|
||||
* vmapbuf() can still fail due to a smaller file mapped
|
||||
* into a larger area of VM, or if userland races against
|
||||
* vmapbuf() after the useracc() check.
|
||||
*/
|
||||
/* Map the buffer into kernel memory. */
|
||||
if (vmapbuf(mapinfo->bp[i], 1) < 0) {
|
||||
uma_zfree(pbuf_zone, mapinfo->bp[i]);
|
||||
goto fail;
|
||||
|
||||
Reference in New Issue
Block a user