Trying to load a l0dable while ELF loading is disabled locks up the lifecycle task

Reproduction

  1. Make sure execute_elf = false is in card10.cfg.
  2. Load an ELF file into apps/
  3. In the menu, select the ELF file.
  4. Screen should now stay black
  5. Press the reset button to attempt a return to menu.
  6. card10 does not return to menu

Symptoms

On the serial console, the following message log is shown:

elf-disabled-lockup

The workqueue warnings are probably caused by Epicardium busy-spinning in the lifecycle task.

Theory

I assume the half-finished load of the ELF (resetting core 1 without actually loading anything) leads to the following load (when going back to the menu) not being able to perform a seconds core 1 reset.