Commit 82fa3955 authored by Ozan Çaglayan's avatar Ozan Çaglayan Committed by Sam Ravnborg

markup_oops: use modinfo to avoid confusion with underscored module names

When EIP is at a module having an underscore in its name, the current code
fails to find it because the module filenames has '-' instead of '_'.  Use
modinfo for a better path finding.
Signed-off-by: default avatarOzan Çaglayan <ozan@pardus.org.tr>
Acked-by: default avatarWANG Cong <xiyou.wangcong@gmail.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent f9d490ab
...@@ -184,10 +184,7 @@ if ($target eq "0") { ...@@ -184,10 +184,7 @@ if ($target eq "0") {
# if it's a module, we need to find the .ko file and calculate a load offset # if it's a module, we need to find the .ko file and calculate a load offset
if ($module ne "") { if ($module ne "") {
my $dir = dirname($filename); my $modulefile = `modinfo $module | grep '^filename:' | awk '{ print \$2 }'`;
$dir = $dir . "/";
my $mod = $module . ".ko";
my $modulefile = `find $dir -name $mod | head -1`;
chomp($modulefile); chomp($modulefile);
$filename = $modulefile; $filename = $modulefile;
if ($filename eq "") { if ($filename eq "") {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment