Skip to content

Commit 82fa395

Browse files
Ozan Çaglayansravnborg
authored andcommitted
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>
1 parent f9d490a commit 82fa395

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎scripts/markup_oops.pl‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,7 @@ sub process_x86_regs
184184

185185
# if it's a module, we need to find the .ko file and calculate a load offset
186186
if ($module ne "") {
187-
my $dir = dirname($filename);
188-
$dir = $dir . "/";
189-
my $mod = $module . ".ko";
190-
my $modulefile = `find $dir -name $mod | head -1`;
187+
my $modulefile = `modinfo $module | grep '^filename:' | awk '{ print \$2 }'`;
191188
chomp($modulefile);
192189
$filename = $modulefile;
193190
if ($filename eq "") {

0 commit comments

Comments
 (0)