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
This commit is contained in:
Roger Pau Monné 2015-07-30 15:28:06 +00:00
parent bc38441579
commit 8f89a299e2

View File

@ -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));
}