public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] markup_oops: Use modinfo to avoid confusion with underscored module names
@ 2009-08-06 12:21 Ozan Çağlayan
  2009-08-06 14:11 ` Arjan van de Ven
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ozan Çağlayan @ 2009-08-06 12:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: arjan

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 to correctly get the full path to the module.

Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
---
This is just a trivial patch to pinpoint the problem. Usage of modinfo is faster than
searching through the filesystem but may not be desirable as it brings a dependency
to module-init-tools. Replacing underscore occurences by '-' can be another solution.

 scripts/markup_oops.pl |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl
index 8977401..bc14f4c 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' | gawk '{ print \$2 }'`;
 	chomp($modulefile);
 	$filename = $modulefile;
 	if ($filename eq "") {
-- 
1.6.3.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-08-10 14:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-06 12:21 [PATCH] markup_oops: Use modinfo to avoid confusion with underscored module names Ozan Çağlayan
2009-08-06 14:11 ` Arjan van de Ven
2009-08-06 15:32   ` Ozan Çağlayan
2009-08-07  1:42 ` Amerigo Wang
2009-08-10  9:13 ` [PATCH v2] " Ozan Çağlayan
2009-08-10 14:37   ` Américo Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox