[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 3 Mar 2015 08:28:04 +0530
From: Tapasweni Pathak <tapaswenipathak@...il.com>
To: matt.fleming@...el.com, tglx@...utronix.de, mingo@...hat.com,
hpa@...or.com, x86@...nel.org, linux-efi@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: tapaswenipathak@...il.com
Subject: [PATCH] arch: x86: platform: efi: Disabling interrupt around kmalloc
Disabling interrupts around kmalloc() is less than ideal. Move it
after the kmalloc().
Found using Coccinelle.
Signed-off-by: Tapasweni Pathak <tapaswenipathak@...il.com>
Suggested-by: Matt Fleming <matt.fleming@...el.com>
---
arch/x86/platform/efi/efi_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
index 17e80d8..5d6af59 100644
--- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c
@@ -88,10 +88,10 @@ void __init efi_call_phys_prolog(void)
return;
early_code_mapping_set_exec(1);
- local_irq_save(efi_flags);
n_pgds = DIV_ROUND_UP((max_pfn << PAGE_SHIFT), PGDIR_SIZE);
save_pgd = kmalloc(n_pgds * sizeof(pgd_t), GFP_KERNEL);
+ local_irq_save(efi_flags);
for (pgd = 0; pgd < n_pgds; pgd++) {
save_pgd[pgd] = *pgd_offset_k(pgd * PGDIR_SIZE);
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists