Skip to content

Commit 3dc14ee

Browse files
committed
KVM: arm64: nv: Use GFP_KERNEL_ACCOUNT for sysreg_masks allocation
Of course, userspace is in the driver's seat for struct kvm and associated allocations. Make sure the sysreg_masks allocation participates in kmem accounting. Reviewed-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent eb9d53d commit 3dc14ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kvm/nested.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ int kvm_init_nv_sysregs(struct kvm *kvm)
198198
goto out;
199199

200200
kvm->arch.sysreg_masks = kzalloc(sizeof(*(kvm->arch.sysreg_masks)),
201-
GFP_KERNEL);
201+
GFP_KERNEL_ACCOUNT);
202202
if (!kvm->arch.sysreg_masks) {
203203
ret = -ENOMEM;
204204
goto out;

0 commit comments

Comments
 (0)