]> git.dujemihanovic.xyz Git - linux.git/commit
efi: efibc: Guard against allocation failure
authorGuilherme G. Piccoli <gpiccoli@igalia.com>
Fri, 9 Sep 2022 19:42:14 +0000 (16:42 -0300)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 20 Sep 2022 16:42:55 +0000 (18:42 +0200)
commit7da5b13dccd99cfdc42940fc7adcb88647023292
treeae56aa7020ffcb03305f147bac40d3841aa3e202
parent9cb636b5f6a8cc6d1b50809ec8f8d33ae0c84c95
efi: efibc: Guard against allocation failure

There is a single kmalloc in this driver, and it's not currently
guarded against allocation failure. Do it here by just bailing-out
the reboot handler, in case this tentative allocation fails.

Fixes: 416581e48679 ("efi: efibc: avoid efivar API for setting variables")
Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/efibc.c