diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2022-06-21 15:48:29 +0200 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2022-06-24 20:40:19 +0200 |
commit | 3a75f9f2f9ad19bb9a0f566373ae91d8f09db85e (patch) | |
tree | d0e2715184101b4a2ca705d0ad2c19796b58a8f2 /drivers/firmware/efi/vars.c | |
parent | efi: pstore: Omit efivars caching EFI varstore access layer (diff) | |
download | linux-3a75f9f2f9ad19bb9a0f566373ae91d8f09db85e.tar.xz linux-3a75f9f2f9ad19bb9a0f566373ae91d8f09db85e.zip |
efi: vars: Use locking version to iterate over efivars linked lists
Both efivars and efivarfs uses __efivar_entry_iter() to go over the
linked list that shadows the list of EFI variables held by the firmware,
but fail to call the begin/end helpers that are documented as a
prerequisite.
So switch to the proper version, which is efivar_entry_iter(). Given
that in both cases, efivar_entry_remove() is invoked with the lock held
already, don't take the lock there anymore.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/vars.c')
-rw-r--r-- | drivers/firmware/efi/vars.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/firmware/efi/vars.c b/drivers/firmware/efi/vars.c index 5640ffa81544..29540013b358 100644 --- a/drivers/firmware/efi/vars.c +++ b/drivers/firmware/efi/vars.c @@ -523,17 +523,10 @@ EXPORT_SYMBOL_GPL(__efivar_entry_add); /** * efivar_entry_remove - remove entry from variable list * @entry: entry to remove from list - * - * Returns 0 on success, or a kernel error code on failure. */ -int efivar_entry_remove(struct efivar_entry *entry) +void efivar_entry_remove(struct efivar_entry *entry) { - if (down_interruptible(&efivars_lock)) - return -EINTR; list_del(&entry->list); - up(&efivars_lock); - - return 0; } EXPORT_SYMBOL_GPL(efivar_entry_remove); |