diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 8e004ad390ab..b8d0924243cc 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -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