Fix for the "mod -S" command to find the debuginfo data for Red Hat

"kpatch" modules.  Without the patch, the command would display
"mod: cannot find or load object file for <kpatch-module> module".
(anderson@redhat.com)
This commit is contained in:
Dave Anderson 2014-06-26 14:55:08 -04:00
parent 754f073901
commit 683ae262f4

View File

@ -4113,6 +4113,17 @@ module_objfile_search(char *modref, char *filename, char *tree)
free(namelist);
}
if (!retbuf && is_kpatch()) {
sprintf(file, "%s.ko", modref);
sprintf(dir, "/usr/lib/kpatch/%s", kt->utsname.release);
if (!(retbuf = search_directory_tree(dir, file, 0))) {
sprintf(file, "%s.ko.debug", modref);
sprintf(dir, "/usr/lib/debug/usr/lib/kpatch/%s",
kt->utsname.release);
retbuf = search_directory_tree(dir, file, 0);
}
}
return retbuf;
}