diff mbox series

xen/efi: Set nonblocking callbacks

Message ID 20190927154920.13713-1-ross.lagerwall@citrix.com (mailing list archive)
State Accepted
Commit df359f0d09dc029829b66322707a2f558cb720f7
Headers show
Series xen/efi: Set nonblocking callbacks | expand

Commit Message

Ross Lagerwall Sept. 27, 2019, 3:49 p.m. UTC
Other parts of the kernel expect these nonblocking EFI callbacks to
exist and crash when running under Xen. Since the implementations of
xen_efi_set_variable() and xen_efi_query_variable_info() do not take any
locks, use them for the nonblocking callbacks too.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
---
 arch/arm/xen/efi.c | 2 ++
 arch/x86/xen/efi.c | 2 ++
 2 files changed, 4 insertions(+)

Comments

Jürgen Groß Sept. 30, 2019, 6:47 a.m. UTC | #1
On 27.09.19 17:49, Ross Lagerwall wrote:
> Other parts of the kernel expect these nonblocking EFI callbacks to
> exist and crash when running under Xen. Since the implementations of
> xen_efi_set_variable() and xen_efi_query_variable_info() do not take any
> locks, use them for the nonblocking callbacks too.
> 
> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen
Jürgen Groß Oct. 1, 2019, 7:38 a.m. UTC | #2
On 27.09.19 17:49, Ross Lagerwall wrote:
> Other parts of the kernel expect these nonblocking EFI callbacks to
> exist and crash when running under Xen. Since the implementations of
> xen_efi_set_variable() and xen_efi_query_variable_info() do not take any
> locks, use them for the nonblocking callbacks too.
> 
> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>

Pushed to xen/tip.git for-linus-5.4


Juergen
Stefano Stabellini Oct. 1, 2019, 5:57 p.m. UTC | #3
On Fri, 27 Sep 2019, Ross Lagerwall wrote:
> Other parts of the kernel expect these nonblocking EFI callbacks to
> exist and crash when running under Xen. Since the implementations of
> xen_efi_set_variable() and xen_efi_query_variable_info() do not take any
> locks, use them for the nonblocking callbacks too.
> 
> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>

Acked-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
>  arch/arm/xen/efi.c | 2 ++
>  arch/x86/xen/efi.c | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/arch/arm/xen/efi.c b/arch/arm/xen/efi.c
> index d687a73044bf..cb2aaf98e243 100644
> --- a/arch/arm/xen/efi.c
> +++ b/arch/arm/xen/efi.c
> @@ -19,7 +19,9 @@ void __init xen_efi_runtime_setup(void)
>  	efi.get_variable             = xen_efi_get_variable;
>  	efi.get_next_variable        = xen_efi_get_next_variable;
>  	efi.set_variable             = xen_efi_set_variable;
> +	efi.set_variable_nonblocking = xen_efi_set_variable;
>  	efi.query_variable_info      = xen_efi_query_variable_info;
> +	efi.query_variable_info_nonblocking = xen_efi_query_variable_info;
>  	efi.update_capsule           = xen_efi_update_capsule;
>  	efi.query_capsule_caps       = xen_efi_query_capsule_caps;
>  	efi.get_next_high_mono_count = xen_efi_get_next_high_mono_count;
> diff --git a/arch/x86/xen/efi.c b/arch/x86/xen/efi.c
> index 0d3365cb64de..7e3eb70f411a 100644
> --- a/arch/x86/xen/efi.c
> +++ b/arch/x86/xen/efi.c
> @@ -65,7 +65,9 @@ static efi_system_table_t __init *xen_efi_probe(void)
>  	efi.get_variable             = xen_efi_get_variable;
>  	efi.get_next_variable        = xen_efi_get_next_variable;
>  	efi.set_variable             = xen_efi_set_variable;
> +	efi.set_variable_nonblocking = xen_efi_set_variable;
>  	efi.query_variable_info      = xen_efi_query_variable_info;
> +	efi.query_variable_info_nonblocking = xen_efi_query_variable_info;
>  	efi.update_capsule           = xen_efi_update_capsule;
>  	efi.query_capsule_caps       = xen_efi_query_capsule_caps;
>  	efi.get_next_high_mono_count = xen_efi_get_next_high_mono_count;
> -- 
> 2.21.0
>
diff mbox series

Patch

diff --git a/arch/arm/xen/efi.c b/arch/arm/xen/efi.c
index d687a73044bf..cb2aaf98e243 100644
--- a/arch/arm/xen/efi.c
+++ b/arch/arm/xen/efi.c
@@ -19,7 +19,9 @@  void __init xen_efi_runtime_setup(void)
 	efi.get_variable             = xen_efi_get_variable;
 	efi.get_next_variable        = xen_efi_get_next_variable;
 	efi.set_variable             = xen_efi_set_variable;
+	efi.set_variable_nonblocking = xen_efi_set_variable;
 	efi.query_variable_info      = xen_efi_query_variable_info;
+	efi.query_variable_info_nonblocking = xen_efi_query_variable_info;
 	efi.update_capsule           = xen_efi_update_capsule;
 	efi.query_capsule_caps       = xen_efi_query_capsule_caps;
 	efi.get_next_high_mono_count = xen_efi_get_next_high_mono_count;
diff --git a/arch/x86/xen/efi.c b/arch/x86/xen/efi.c
index 0d3365cb64de..7e3eb70f411a 100644
--- a/arch/x86/xen/efi.c
+++ b/arch/x86/xen/efi.c
@@ -65,7 +65,9 @@  static efi_system_table_t __init *xen_efi_probe(void)
 	efi.get_variable             = xen_efi_get_variable;
 	efi.get_next_variable        = xen_efi_get_next_variable;
 	efi.set_variable             = xen_efi_set_variable;
+	efi.set_variable_nonblocking = xen_efi_set_variable;
 	efi.query_variable_info      = xen_efi_query_variable_info;
+	efi.query_variable_info_nonblocking = xen_efi_query_variable_info;
 	efi.update_capsule           = xen_efi_update_capsule;
 	efi.query_capsule_caps       = xen_efi_query_capsule_caps;
 	efi.get_next_high_mono_count = xen_efi_get_next_high_mono_count;