Commit e0136112 authored by Peng Hao's avatar Peng Hao Committed by Sean Christopherson
Browse files

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: default avatarPeng Hao <flyingpeng@tencent.com>
Link: https://lore.kernel.org/r/20250428063013.62311-1-flyingpeng@tencent.com


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 5ecdb48d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;