Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jul 2015 15:28:07 +0000 (UTC)
From:      Roger Pau Monné <royger@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r286076 - head/sys/kern
Message-ID:  <201507301528.t6UFS7oo091539@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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));
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507301528.t6UFS7oo091539>