]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
libdwfl: Fix Linux kernel module search when dwfl_build_id_find_elf closes fd on...
authorRoland McGrath <roland@redhat.com>
Wed, 30 Jun 2010 07:45:58 +0000 (00:45 -0700)
committerRoland McGrath <roland@redhat.com>
Wed, 30 Jun 2010 07:45:58 +0000 (00:45 -0700)
libdwfl/ChangeLog
libdwfl/linux-kernel-modules.c

index ff850ebff26c20f0dff1f3c774bbc6607415944b..5620e23c4d6c6d9d4db982197ad0f145c86f8a04 100644 (file)
@@ -1,3 +1,9 @@
+2010-06-30  Roland McGrath  <roland@redhat.com>
+
+       * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Don't be
+       confused by -1 return from dwfl_build_id_find_elf after it opened
+       the Elf handle.
+
 2010-06-16  Roland McGrath  <roland@redhat.com>
 
        * cu.c (cudie_offset): Use DIE_OFFSET_FROM_CU_OFFSET macro.
index c30ff1a3a1304a99a42322d0e8297f61c171a84e..2479292ac6b0bf6719bfabea4825b973c50e8095 100644 (file)
@@ -627,7 +627,7 @@ dwfl_linux_kernel_find_elf (Dwfl_Module *mod,
     {
       int fd = INTUSE(dwfl_build_id_find_elf) (mod, NULL, NULL, 0,
                                               file_name, elfp);
-      if (fd >= 0 || errno != 0)
+      if (fd >= 0 || mod->main.elf != NULL || errno != 0)
        return fd;
     }