Skip to content
  • Will Deacon's avatar
    kvm tools: die if init_list__init returns failure · 5b403dbf
    Will Deacon authored
    
    
    If init_list__init returns failure when initialising kvm tool, we can't
    rely on our structures being fully initialised, so die rather than try
    to continue and fail gracefully later on.
    
    This prevents a SEGV when kvm is not available on the host:
    
      Error: '/dev/kvm' not found. Please make sure your kernel has CONFIG_KVM enabled and that the KVM modules are loaded.
      Warning: Failed init: kvm__init
    
    Segmentation fault
    
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
    5b403dbf