efi: Make efi_rts_work accessible to efi page fault handler
authorSai Praneeth <sai.praneeth.prakhya@intel.com>
Tue, 11 Sep 2018 19:15:21 +0000 (12:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2020 06:14:21 +0000 (07:14 +0100)
commit53afdba2c35e6c4a9e5e2e05cf94e72d7ab51660
tree22e51cd6352eb8951b47c3c1c86ef47969a2fd97
parent86896c1c578521b3a96c1178fafe7cdad858248c
efi: Make efi_rts_work accessible to efi page fault handler

commit 9dbbedaa6171247c4c7c40b83f05b200a117c2e0 upstream.

After the kernel has booted, if any accesses by firmware causes a page
fault, the efi page fault handler would freeze efi_rts_wq and schedules
a new process. To do this, the efi page fault handler needs
efi_rts_work. Hence, make it accessible.

There will be no race conditions in accessing this structure, because
all the calls to efi runtime services are already serialized.

Tested-by: Bhupesh Sharma <bhsharma@redhat.com>
Suggested-by: Matt Fleming <matt@codeblueprint.co.uk>
Based-on-code-from: Ricardo Neri <ricardo.neri@intel.com>
Signed-off-by: Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Fixes: 3eb420e70d87 (“efi: Use a work queue to invoke EFI Runtime Services”)
Signed-off-by: Wen Yang <wenyang@linux.alibaba.com>
Cc: Caspar Zhang <caspar@linux.alibaba.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/efi/runtime-wrappers.c
include/linux/efi.h