Page MenuHomeFreeBSD

arm64/pmap: Modify condition of valid_memattr that cannot be true
Needs ReviewPublic

Authored by timo.voelker_fh-muenster.de on Thu, Feb 26, 4:07 PM.
Tags
None
Referenced Files
F146037817: D55534.diff
Fri, Feb 27, 6:35 AM
F146027689: D55534.id172777.diff
Fri, Feb 27, 4:17 AM
F146016829: D55534.id.diff
Fri, Feb 27, 1:50 AM
F146008621: D55534.diff
Thu, Feb 26, 11:57 PM
F146006008: D55534.id172777.diff
Thu, Feb 26, 11:18 PM
F145973289: D55534.id172777.diff
Thu, Feb 26, 4:14 PM
Subscribers

Details

Reviewers
andrew
tuexen
manu
Summary

The function pmap_is_valid_memattr(pmap, mode) checks whether the given variable mode is between the two constant values VM_MEMATTR_DEVICE and VM_MEMATTR_WRITE_THROUGH. After the code for this function was written, the value of VM_MEMATTR_DEVICE changed from 0 to 4. Since VM_MEMATTR_WRITE_THROUGH is still 3, the condition is always false.

This patch changes the condition to check whether mode is equal to any of the VM_MEMATTR* constants.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped