]> git.baikalelectronics.ru Git - kernel.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)
commit88439c9420cc261085c11c3b18760c5550ad3bb2
tree6da384231bce837a16655294a2c40f3cfe916dcc
parentfa277527769ff5dad6c26a3760161c4b823fdeea
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