]> www.infradead.org Git - users/jedix/linux-maple.git/commit
efivarfs: add variable resync after hibernation
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Tue, 7 Jan 2025 21:31:29 +0000 (13:31 -0800)
committerArd Biesheuvel <ardb@kernel.org>
Wed, 22 Jan 2025 12:28:17 +0000 (13:28 +0100)
commitb5d1e6ee761a109400e97ac6a1b91c57d0f6a43a
tree0d0e93990f4afe25b16ddbc5d395b7bdacbbc86c
parent0e2f98da2071bae0f07135adb9b3efdb737aaee6
efivarfs: add variable resync after hibernation

Hibernation allows other OSs to boot and thus the variable state might
be altered by the time the hibernation image is resumed.  Resync the
variable state by looping over all the dentries and update the size
(in case of alteration) delete any which no-longer exist.  Finally,
loop over all efi variables creating any which don't have
corresponding dentries.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
[ardb: - apply error pointer fixup from Dan Carpenter
       - rebase onto latest version of James's efivarfs rework]
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
fs/efivarfs/internal.h
fs/efivarfs/super.c
fs/efivarfs/vars.c