summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2004-12-05 21:48:11 +0000
committeralc <alc@FreeBSD.org>2004-12-05 21:48:11 +0000
commitfcf141e6aa5516034183c5d2ce9753fabf0e2a39 (patch)
tree7fd41b62937d4f1fd1deff0425c73b5c1ec63455 /sys/vm
parentcdb5b5cf1c728d60d5e7345da2293845cd2d04e1 (diff)
downloadFreeBSD-src-fcf141e6aa5516034183c5d2ce9753fabf0e2a39.zip
FreeBSD-src-fcf141e6aa5516034183c5d2ce9753fabf0e2a39.tar.gz
Correct a sanity check in vnode_pager_generic_putpages(). The cast used
to implement the sanity check should have been changed when we converted the implementation of vm_pindex_t from 32 to 64 bits. (Thus, RELENG_4 is not affected.) The consequence of this error would be a legimate write to an extremely large file being treated as an errant attempt to write meta- data. Discussed with: tegge@
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vnode_pager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c
index 0856f96..dde29d7 100644
--- a/sys/vm/vnode_pager.c
+++ b/sys/vm/vnode_pager.c
@@ -1013,7 +1013,7 @@ vnode_pager_generic_putpages(vp, m, bytecount, flags, rtvals)
for (i = 0; i < count; i++)
rtvals[i] = VM_PAGER_AGAIN;
- if ((int) m[0]->pindex < 0) {
+ if ((int64_t)m[0]->pindex < 0) {
printf("vnode_pager_putpages: attempt to write meta-data!!! -- 0x%lx(%lx)\n",
(long)m[0]->pindex, (u_long)m[0]->dirty);
rtvals[0] = VM_PAGER_BAD;
OpenPOWER on IntegriCloud