Skip to content

Commit e013611

Browse files
flying-122sean-jc
authored andcommitted
x86/sev: Remove unnecessary GFP_KERNEL_ACCOUNT for temporary variables
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent 5ecdb48 commit e013611

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/kvm/svm/sev.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,11 +1594,11 @@ static int sev_send_update_data(struct kvm *kvm, struct kvm_sev_cmd *argp)
15941594

15951595
/* allocate memory for header and transport buffer */
15961596
ret = -ENOMEM;
1597-
hdr = kzalloc(params.hdr_len, GFP_KERNEL_ACCOUNT);
1597+
hdr = kzalloc(params.hdr_len, GFP_KERNEL);
15981598
if (!hdr)
15991599
goto e_unpin;
16001600

1601-
trans_data = kzalloc(params.trans_len, GFP_KERNEL_ACCOUNT);
1601+
trans_data = kzalloc(params.trans_len, GFP_KERNEL);
16021602
if (!trans_data)
16031603
goto e_free_hdr;
16041604

0 commit comments

Comments
 (0)