svn commit: r359901 - head/sys/cam
Warner Losh
imp at FreeBSD.org
Mon Apr 13 21:03:30 UTC 2020
Author: imp
Date: Mon Apr 13 21:03:30 2020
New Revision: 359901
URL: https://svnweb.freebsd.org/changeset/base/359901
Log:
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.
Modified:
head/sys/cam/cam_periph.c
Modified: head/sys/cam/cam_periph.c
==============================================================================
--- head/sys/cam/cam_periph.c Mon Apr 13 20:59:09 2020 (r359900)
+++ head/sys/cam/cam_periph.c Mon Apr 13 21:03:30 2020 (r359901)
@@ -971,14 +971,7 @@ cam_periph_mapmem(union ccb *ccb, struct cam_periph_ma
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;
More information about the svn-src-all
mailing list