• Johan Hovold's avatar
    efi: fix NULL-deref in init error path · 703c13fe
    Johan Hovold authored
    In cases where runtime services are not supported or have been disabled,
    the runtime services workqueue will never have been allocated.
    
    Do not try to destroy the workqueue unconditionally in the unlikely
    event that EFI initialisation fails to avoid dereferencing a NULL
    pointer.
    
    Fixes: 98086df8 ("efi: add missed destroy_workqueue when efisubsys_init fails")
    Cc: stable@vger.kernel.org
    Cc: Li Heng <liheng40@huawei.com>
    Signed-off-by: default avatarJohan Hovold <johan+linaro@kernel.org>
    Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
    703c13fe
efi.c 28.3 KB