]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/sev: Remove unnecessary GFP_KERNEL_ACCOUNT for temporary variables
authorPeng Hao <flyingpeng@tencent.com>
Mon, 28 Apr 2025 06:30:13 +0000 (14:30 +0800)
committerSean Christopherson <seanjc@google.com>
Mon, 28 Apr 2025 18:09:55 +0000 (11:09 -0700)
Some variables allocated in sev_send_update_data are released when
the function exits, so there is no need to set GFP_KERNEL_ACCOUNT.

Signed-off-by: Peng Hao <flyingpeng@tencent.com>
Link: https://lore.kernel.org/r/20250428063013.62311-1-flyingpeng@tencent.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/sev.c

index 99e4dcf429e4997c731b5cdf393868e7ab24072a..c6c2975e25ed4039f26a2a9ac67e7523a6172f05 100644 (file)
@@ -1594,11 +1594,11 @@ static int sev_send_update_data(struct kvm *kvm, struct kvm_sev_cmd *argp)
 
        /* allocate memory for header and transport buffer */
        ret = -ENOMEM;
-       hdr = kzalloc(params.hdr_len, GFP_KERNEL_ACCOUNT);
+       hdr = kzalloc(params.hdr_len, GFP_KERNEL);
        if (!hdr)
                goto e_unpin;
 
-       trans_data = kzalloc(params.trans_len, GFP_KERNEL_ACCOUNT);
+       trans_data = kzalloc(params.trans_len, GFP_KERNEL);
        if (!trans_data)
                goto e_free_hdr;