]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
efi/tpm: Return -EINVAL when determining tpm final events log size fails
authorJerry Snitselaar <jsnitsel@redhat.com>
Tue, 29 Oct 2019 17:37:51 +0000 (18:37 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 4 Dec 2019 09:29:26 +0000 (10:29 +0100)
commitd215cba2867bfa754ef6de1b2aa0c888385dbb9b
tree3f46fb3b690128423ca902f60bb6bc2b406f64fd
parentcc29a1d846df9bd391b916887227ff8ae9396e70
efi/tpm: Return -EINVAL when determining tpm final events log size fails

BugLink: https://bugs.launchpad.net/bugs/1852338
[ Upstream commit 2bb6a81633cb47dcba4c9f75605cbe49e6b73d60 ]

Currently nothing checks the return value of efi_tpm_eventlog_init(),
but in case that changes in the future make sure an error is
returned when it fails to determine the tpm final events log
size.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
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
Fixes: e658c82be556 ("efi/tpm: Only set 'efi_tpm_final_log_size' after ...")
Link: https://lkml.kernel.org/r/20191029173755.27149-3-ardb@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/firmware/efi/tpm.c