From: Tapasweni Pathak <tapaswenipathak@gmail.com>
To: matt.fleming@intel.com, tglx@linutronix.de, mingo@redhat.com,
hpa@zytor.com, x86@kernel.org, linux-efi@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: tapaswenipathak@gmail.com
Subject: [PATCH] arch: x86: platform: efi: Disabling interrupt around kmalloc
Date: Tue, 3 Mar 2015 08:28:04 +0530 [thread overview]
Message-ID: <20150303025804.GA24587@kt-Inspiron-3542> (raw)
Disabling interrupts around kmalloc() is less than ideal. Move it
after the kmalloc().
Found using Coccinelle.
Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Suggested-by: Matt Fleming <matt.fleming@intel.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
next reply other threads:[~2015-03-03 2:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 2:58 Tapasweni Pathak [this message]
2015-03-03 6:34 ` [PATCH] efi: Disable interrupts around EFI calls, not in the epilog/prolog calls Ingo Molnar
[not found] ` <20150303063433.GA30468-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-03-03 6:48 ` [PATCH] efi: Clean up the efi_call_phys_[prolog|epilog]() save/restore interaction Ingo Molnar
[not found] ` <20150303064850.GA30036-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-03-10 13:36 ` Matt Fleming
2015-03-10 13:36 ` [PATCH] efi: Disable interrupts around EFI calls, not in the epilog/prolog calls Matt Fleming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150303025804.GA24587@kt-Inspiron-3542 \
--to=tapaswenipathak@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).