Commit ed14b491 authored by Quentin Perret's avatar Quentin Perret
Browse files

ANDROID: KVM: arm64: Fix accounting of pinned THPs with pKVM



When faulting in a THP, we proactively account the entire huge page
against RLIMIT_MEMLOCK before trying to map it. However, if we happen to
find an already mapped page in the THP range after that, we retry to
fault at page granularity instead and fixup the accounting
accordingly.

Unfortunately the fixing of the accounting is done incorrectly -- we
only substract PAGE_SIZE instead of the full HP size. Fix that.

Bug: 278749606
Bug: 278011447
Change-Id: I20498c42fcba6efa2c80cb63057bbada6ad8fa87
Signed-off-by: default avatarQuentin Perret <qperret@google.com>
parent 7a3007d1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment