Return-Path: Received: from smtp1.linux-foundation.org ([140.211.169.13]:38641 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752377AbZIRTuK (ORCPT ); Fri, 18 Sep 2009 15:50:10 -0400 Message-Id: <200909181949.n8IJnSbl019077@imap1.linux-foundation.org> Subject: [patch 08/18] markup_oops: use modinfo to avoid confusion with underscored module names From: akpm@linux-foundation.org Date: Fri, 18 Sep 2009 12:49:27 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: sam@ravnborg.org Cc: linux-kbuild@vger.kernel.org, akpm@linux-foundation.org, ozan@pardus.org.tr, arjan@infradead.org, xiyou.wangcong@gmail.com From: Ozan Çaglayan 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 Acked-by: WANG Cong Cc: Arjan van de Ven Cc: Sam Ravnborg Signed-off-by: Andrew Morton --- scripts/markup_oops.pl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff -puN scripts/markup_oops.pl~markup_oops-use-modinfo-to-avoid-confusion-with-underscored-module-names scripts/markup_oops.pl --- a/scripts/markup_oops.pl~markup_oops-use-modinfo-to-avoid-confusion-with-underscored-module-names +++ a/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 "") { _