summaryrefslogtreecommitdiff
path: root/scripts/markup_oops.pl
diff options
context:
space:
mode:
authorOzan Çaglayan <ozan@pardus.org.tr>2009-09-18 23:49:27 +0400
committerSam Ravnborg <sam@ravnborg.org>2009-09-20 14:27:43 +0400
commit82fa39552fd858468a5647fa58d14955ecd50eb4 (patch)
tree92b29c2f4780dc5480a1125354415f8f3bfd4bf1 /scripts/markup_oops.pl
parentf9d490ab374236a115440c771ecf0fb2890eb929 (diff)
downloadlinux-82fa39552fd858468a5647fa58d14955ecd50eb4.tar.xz
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: Ozan Çaglayan <ozan@pardus.org.tr> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Cc: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/markup_oops.pl')
-rw-r--r--scripts/markup_oops.pl5
1 files changed, 1 insertions, 4 deletions
diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl
index 89774011965d..5f0fcb712e29 100644
--- a/scripts/markup_oops.pl
+++ b/scripts/markup_oops.pl
@@ -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 ($module ne "") {
- my $dir = dirname($filename);
- $dir = $dir . "/";
- my $mod = $module . ".ko";
- my $modulefile = `find $dir -name $mod | head -1`;
+ my $modulefile = `modinfo $module | grep '^filename:' | awk '{ print \$2 }'`;
chomp($modulefile);
$filename = $modulefile;
if ($filename eq "") {