summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-11-22 12:50:00 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2024-11-22 12:50:00 -0800
commitbe9318cd5a36ff67689e0fb0f8f5007a56290ac7 (patch)
tree4b0c00abc26c8270b94828ba5a15dc6c491517fa /arch/x86
parent563cb0b1e736853cfc78956b9de362d2aae74887 (diff)
parentf060c89dc1a3cfb6db3894e1d96980a568aa355c (diff)
Merge tag 'x86_sgx_for_6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull sgx update from Dave Hansen: - Use vmalloc_array() instead of vmalloc() * tag 'x86_sgx_for_6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sgx: Use vmalloc_array() instead of vmalloc()
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/cpu/sgx/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/sgx/main.c b/arch/x86/kernel/cpu/sgx/main.c
index eb5848d1851a..8ce352fc72ac 100644
--- a/arch/x86/kernel/cpu/sgx/main.c
+++ b/arch/x86/kernel/cpu/sgx/main.c
@@ -630,7 +630,7 @@ static bool __init sgx_setup_epc_section(u64 phys_addr, u64 size,
if (!section->virt_addr)
return false;
- section->pages = vmalloc(nr_pages * sizeof(struct sgx_epc_page));
+ section->pages = vmalloc_array(nr_pages, sizeof(struct sgx_epc_page));
if (!section->pages) {
memunmap(section->virt_addr);
return false;