Page MenuHomeFreeBSD

linuxkpi: Fix set_memory_*
ClosedPublic

Authored by tijl on Thu, May 2, 9:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 4, 5:57 PM
Unknown Object (File)
Fri, May 3, 7:50 PM
Unknown Object (File)
Thu, May 2, 3:27 PM
Unknown Object (File)
Thu, May 2, 3:27 PM
Unknown Object (File)
Thu, May 2, 2:54 PM

Details

Summary

set_memory_* is currently implemented using PHYS_TO_DMAP but not all
architectures have a DMAP. Looking at how this function is used the
given address isn't physical, but virtual so the PHYS_TO_DMAP call
can simply be removed.

Also cast numpages before shifting it to avoid overflow.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable