svn commit: r295716 - head/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Wed Feb 17 19:39:58 UTC 2016
Author: kib
Date: Wed Feb 17 19:39:57 2016
New Revision: 295716
URL: https://svnweb.freebsd.org/changeset/base/295716
Log:
In bnoreuselist(), check both ends of the specified logical block
numbers range.
This effectively skips indirect and extdata blocks on the buffer
queue. Since their logical block numbers are negative, bnoreuselist()
could loop infinitely.
Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Modified:
head/sys/kern/vfs_subr.c
Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c Wed Feb 17 19:11:09 2016 (r295715)
+++ head/sys/kern/vfs_subr.c Wed Feb 17 19:39:57 2016 (r295716)
@@ -1673,7 +1673,8 @@ bnoreuselist(struct bufv *bufv, struct b
for (lblkno = startn;;) {
again:
bp = BUF_PCTRIE_LOOKUP_GE(&bufv->bv_root, lblkno);
- if (bp == NULL || bp->b_lblkno >= endn)
+ if (bp == NULL || bp->b_lblkno >= endn ||
+ bp->b_lblkno < startn)
break;
error = BUF_TIMELOCK(bp, LK_EXCLUSIVE | LK_SLEEPFAIL |
LK_INTERLOCK, BO_LOCKPTR(bo), "brlsfl", 0, 0);
More information about the svn-src-head
mailing list