]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
efi/x86: Fix the deletion of variables in mixed mode
authorGary Lin <glin@suse.com>
Thu, 9 Apr 2020 13:04:33 +0000 (15:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 08:48:55 +0000 (10:48 +0200)
commit94fe9e44dc69b141125b2fa948a46b8f48dd7f55
tree4fd36f47c96023cc767d6b89807e736ee30f6136
parent502d8e56139c25283adaeda7f25bcb7f8c242453
efi/x86: Fix the deletion of variables in mixed mode

[ Upstream commit a4b81ccfd4caba017d2b84720b6de4edd16911a0 ]

efi_thunk_set_variable() treated the NULL "data" pointer as an invalid
parameter, and this broke the deletion of variables in mixed mode.
This commit fixes the check of data so that the userspace program can
delete a variable in mixed mode.

Fixes: 8319e9d5ad98ffcc ("efi/x86: Handle by-ref arguments covering multiple pages in mixed mode")
Signed-off-by: Gary Lin <glin@suse.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200408081606.1504-1-glin@suse.com
Link: https://lore.kernel.org/r/20200409130434.6736-9-ardb@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/platform/efi/efi_64.c