summaryrefslogtreecommitdiffstats
path: root/arch/x86/platform
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@gmail.com>2018-03-08 08:00:14 +0000
committerIngo Molnar <mingo@kernel.org>2018-03-09 08:58:22 +0100
commit9f66d8d73e654c5f867daa6aa186300ecaf49d3a (patch)
tree003f256d71b4d46dbf30de1dea702cdfae94bacb /arch/x86/platform
parent7e611e7dbb235938fca1dd359bad5e5f86ceabcb (diff)
downloadlinux-0-day-9f66d8d73e654c5f867daa6aa186300ecaf49d3a.tar.gz
linux-0-day-9f66d8d73e654c5f867daa6aa186300ecaf49d3a.tar.xz
x86/efi: Replace GFP_ATOMIC with GFP_KERNEL in efi_query_variable_store()
efi_query_variable_store() does an atomic kzalloc() unnecessarily, because we can never get this far when called in an atomic context, namely when nonblocking == 1. Replace it with GFP_KERNEL. This was found by the DCNS static analysis tool written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Matt Fleming <matt@codeblueprint.co.uk> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20180308080020.22828-7-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/platform')
-rw-r--r--arch/x86/platform/efi/quirks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c
index 5b513ccffde40..1ef11c26f79bb 100644
--- a/arch/x86/platform/efi/quirks.c
+++ b/arch/x86/platform/efi/quirks.c
@@ -177,7 +177,7 @@ efi_status_t efi_query_variable_store(u32 attributes, unsigned long size,
* that by attempting to use more space than is available.
*/
unsigned long dummy_size = remaining_size + 1024;
- void *dummy = kzalloc(dummy_size, GFP_ATOMIC);
+ void *dummy = kzalloc(dummy_size, GFP_KERNEL);
if (!dummy)
return EFI_OUT_OF_RESOURCES;