mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
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:
parent
64c4dfcd26
commit
450a2e2a12
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=359901
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue