svn commit: r353964 - head/sys/vm
Mark Johnston
markj at FreeBSD.org
Wed Oct 23 20:39:21 UTC 2019
Author: markj
Date: Wed Oct 23 20:39:21 2019
New Revision: 353964
URL: https://svnweb.freebsd.org/changeset/base/353964
Log:
Modify release_page() to handle a missing fault page.
r353890 introduced a case where we may call release_page() with
fs.m == NULL, since the fault handler may now lock the vnode prior
to allocating a page for a page-in.
Reported by: jhb
Reviewed by: kib
MFC with: r353890
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22120
Modified:
head/sys/vm/vm_fault.c
Modified: head/sys/vm/vm_fault.c
==============================================================================
--- head/sys/vm/vm_fault.c Wed Oct 23 20:37:15 2019 (r353963)
+++ head/sys/vm/vm_fault.c Wed Oct 23 20:39:21 2019 (r353964)
@@ -154,11 +154,13 @@ static inline void
release_page(struct faultstate *fs)
{
- vm_page_xunbusy(fs->m);
- vm_page_lock(fs->m);
- vm_page_deactivate(fs->m);
- vm_page_unlock(fs->m);
- fs->m = NULL;
+ if (fs->m != NULL) {
+ vm_page_xunbusy(fs->m);
+ vm_page_lock(fs->m);
+ vm_page_deactivate(fs->m);
+ vm_page_unlock(fs->m);
+ fs->m = NULL;
+ }
}
static inline void
More information about the svn-src-all
mailing list