diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-01-13 17:37:10 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-01-13 17:37:10 +0100 |
commit | 0bf913e07b377cfc288cfe488ca30b7d67059d8a (patch) | |
tree | 9121ef189b0d11e16d4767ecc8d2a97ae9d86906 /include | |
parent | Merge tag 'docs-6.2-fixes' of git://git.lwn.net/linux (diff) | |
parent | efi: tpm: Avoid READ_ONCE() for accessing the event log (diff) | |
download | linux-0bf913e07b377cfc288cfe488ca30b7d67059d8a.tar.xz linux-0bf913e07b377cfc288cfe488ca30b7d67059d8a.zip |
Merge tag 'efi-fixes-for-v6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi
Pull EFI fixes from Ard Biesheuvel:
- avoid a potential crash on the efi_subsys_init() error path
- use more appropriate error code for runtime services calls issued
after a crash in the firmware occurred
- avoid READ_ONCE() for accessing firmware tables that may appear
misaligned in memory
* tag 'efi-fixes-for-v6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
efi: tpm: Avoid READ_ONCE() for accessing the event log
efi: rt-wrapper: Add missing include
efi: fix userspace infinite retry read efivars after EFI runtime services page fault
efi: fix NULL-deref in init error path
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/tpm_eventlog.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/tpm_eventlog.h b/include/linux/tpm_eventlog.h index 20c0ff54b7a0..7d68a5cc5881 100644 --- a/include/linux/tpm_eventlog.h +++ b/include/linux/tpm_eventlog.h @@ -198,8 +198,8 @@ static __always_inline int __calc_tpm2_event_size(struct tcg_pcr_event2_head *ev * The loop below will unmap these fields if the log is larger than * one page, so save them here for reference: */ - count = READ_ONCE(event->count); - event_type = READ_ONCE(event->event_type); + count = event->count; + event_type = event->event_type; /* Verify that it's the log header */ if (event_header->pcr_idx != 0 || |