svn commit: r286076 - head/sys/kern

Roger Pau Monné royger at FreeBSD.org
Thu Jul 30 15:28:07 UTC 2015


Author: royger
Date: Thu Jul 30 15:28:06 2015
New Revision: 286076
URL: https://svnweb.freebsd.org/changeset/base/286076

Log:
  vfs: fix off-by-one error in vfs_buf_check_mapped
  
  The check added in r285872 can trigger for valid buffers if the buffer space
  used happens to be just after unmapped_buf in KVA space.
  
  Discussed with: kib
  Sponsored by: Citrix Systems R&D

Modified:
  head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==============================================================================
--- head/sys/kern/vfs_bio.c	Thu Jul 30 14:44:13 2015	(r286075)
+++ head/sys/kern/vfs_bio.c	Thu Jul 30 15:28:06 2015	(r286076)
@@ -955,7 +955,7 @@ vfs_buf_check_mapped(struct buf *bp)
 	    ("mapped buf: b_kvabase was not updated %p", bp));
 	KASSERT(bp->b_data != unmapped_buf,
 	    ("mapped buf: b_data was not updated %p", bp));
-	KASSERT(bp->b_data < unmapped_buf || bp->b_data > unmapped_buf +
+	KASSERT(bp->b_data < unmapped_buf || bp->b_data => unmapped_buf +
 	    MAXPHYS, ("b_data + b_offset unmapped %p", bp));
 }
 


More information about the svn-src-all mailing list