git: 214257da3a56 - main - sendfile: Clear page pointers when handling a pager error
Mark Johnston
markj at FreeBSD.org
Sun Jan 3 16:51:15 UTC 2021
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=214257da3a562d1a330a6ce784074a952d354754
commit 214257da3a562d1a330a6ce784074a952d354754
Author: Mark Johnston <markj at FreeBSD.org>
AuthorDate: 2021-01-03 16:35:42 +0000
Commit: Mark Johnston <markj at FreeBSD.org>
CommitDate: 2021-01-03 16:50:31 +0000
sendfile: Clear page pointers when handling a pager error
When INVARIANTS is configred, the sendfile_iodone() callback verifies
that pages attached to the sendfile header are wired, but we unwire all
such pages after a synchronous pager error, before calling
sendfile_iodone().
Reported by: pho
Tested by: pho
Sponsored by: The FreeBSD Foundation
---
sys/kern/kern_sendfile.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c
index 18c9ade721a9..7d7be6f072e9 100644
--- a/sys/kern/kern_sendfile.c
+++ b/sys/kern/kern_sendfile.c
@@ -540,6 +540,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, int *nios, off_t off,
("%s: page %p[%d] I/O recovery failure",
__func__, pa, j));
vm_page_unwire(pa[j], PQ_INACTIVE);
+ pa[j] = NULL;
}
return (EIO);
}
More information about the dev-commits-src-main
mailing list