HomeFreeBSD

vm: Fix overflow issues in vm_page_startup

Description

vm: Fix overflow issues in vm_page_startup

Firstly, pagecount is a u_long so we should ensure j is the same for the
sake of 64-bit systems. Secondly, ptoa is just a macro, and does not
cast its argument, so in order to handle PAE systems correctly we need
to cast j to vm_paddr_t (the type of startp).

Fixes: 0078df5f0258 ("vm_phys: reduce touching of page->pool fields")

Details

Provenance
jrtc27Authored on Fri, Jan 31, 6:37 PM
Parents
rGe5764cf07588: linuxkpi: Don't destroy the mutex in `xa_destroy()`
Branches
Unknown
Tags
Unknown