svn commit: r319963 - stable/11/sys/vm
Jung-uk Kim
jkim at FreeBSD.org
Thu Jun 15 02:39:35 UTC 2017
Author: jkim
Date: Thu Jun 15 02:39:33 2017
New Revision: 319963
URL: https://svnweb.freebsd.org/changeset/base/319963
Log:
Null pointer must be checked before use. This fixes a regression introduced
in r318716.
Note it is a direct commit to stable/11 because head removed support for
idle page zeroing in r305362.
PR: 219994
Reviewed by: markj
Approved by: re (gjb)
Modified:
stable/11/sys/vm/vm_page.c
Modified: stable/11/sys/vm/vm_page.c
==============================================================================
--- stable/11/sys/vm/vm_page.c Thu Jun 15 00:59:02 2017 (r319962)
+++ stable/11/sys/vm/vm_page.c Thu Jun 15 02:39:33 2017 (r319963)
@@ -1759,18 +1759,18 @@ retry:
pagedaemon_wakeup();
return (NULL);
}
- if (m_ret != NULL)
+ if (m_ret != NULL) {
vm_phys_freecnt_adj(m_ret, -npages);
- else {
+ for (m = m_ret; m < &m_ret[npages]; m++)
+ if ((m->flags & PG_ZERO) != 0)
+ vm_page_zero_count--;
+ } else {
#if VM_NRESERVLEVEL > 0
if (vm_reserv_reclaim_contig(npages, low, high, alignment,
boundary))
goto retry;
#endif
}
- for (m = m_ret; m < &m_ret[npages]; m++)
- if ((m->flags & PG_ZERO) != 0)
- vm_page_zero_count--;
mtx_unlock(&vm_page_queue_free_mtx);
if (m_ret == NULL)
return (NULL);
More information about the svn-src-stable-11
mailing list