Skip to content

Commit

Permalink
Merge tag 'x86_sgx_for_6.13-rc1' of git://git.kernel.org/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x/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()
  • Loading branch information
Linus Torvalds committed Nov 22, 2024
2 parents 563cb0b + f060c89 commit be9318c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/cpu/sgx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit be9318c

Please sign in to comment.