]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
efi: Permit calling efi_mem_reserve_persistent() from atomic context
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 14 Nov 2018 17:55:44 +0000 (09:55 -0800)
committerIngo Molnar <mingo@kernel.org>
Thu, 15 Nov 2018 09:04:47 +0000 (10:04 +0100)
commit63eb322d89c8505af9b4a3d703e85e42281ebaa0
tree6da384231bce837a16655294a2c40f3cfe916dcc
parenteff896288872d687d9662000ec9ae11b6d61766f
efi: Permit calling efi_mem_reserve_persistent() from atomic context

Currently, efi_mem_reserve_persistent() may not be called from atomic
context, since both the kmalloc() call and the memremap() call may
sleep.

The kmalloc() call is easy enough to fix, but the memremap() call
needs to be moved into an init hook since we cannot control the
memory allocation behavior of memremap() at the call site.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20181114175544.12860-6-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
drivers/firmware/efi/efi.c