The error is likely caused by the following 2 checks: https://github.com/torvalds/linux/blob/master/arch/x86/platform/efi/efi_64.c#L641 https://github.com/torvalds/linux/blob/master/arch/x86/platform/efi/efi_64.c#L672 When removing a UEFI variable, "data" has to be NULL. That explains why adding a variable is fine but deleting a variable triggered the error.