On Tue, Dec 20, 2022, Reiji Watanabe wrote: > kvm_vm_elf_load() and elfhdr_get() open one file each, but they > never close the opened file descriptor. If a test repeatedly > creates and destroys a VM with __vm_create(), which > (directly or indirectly) calls those two functions, the test > might end up getting a open failure with EMFILE. > Fix those two functions to close the file descriptor. > > Signed-off-by: Reiji Watanabe <reijiw@xxxxxxxxxx> > Reviewed-by: Oliver Upton <oliver.upton@xxxxxxxxx> > Reviewed-by: Andrew Jones <andrew.jones@xxxxxxxxx> > --- Reviewed-by: Sean Christopherson <seanjc@xxxxxxxxxx>