From patchwork Fri Sep 18 19:49:27 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 48618 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8IJopXg004996 for ; Fri, 18 Sep 2009 19:50:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752529AbZIRTuO (ORCPT ); Fri, 18 Sep 2009 15:50:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753408AbZIRTuM (ORCPT ); Fri, 18 Sep 2009 15:50:12 -0400 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 Received: from imap1.linux-foundation.org (imap1.linux-foundation.org [140.211.169.55]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id n8IJnSZE008150 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Sep 2009 12:49:29 -0700 Received: from localhost.localdomain (localhost [127.0.0.1]) by imap1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id n8IJnSbl019077; Fri, 18 Sep 2009 12:49:28 -0700 Message-Id: <200909181949.n8IJnSbl019077@imap1.linux-foundation.org> Subject: [patch 08/18] markup_oops: use modinfo to avoid confusion with underscored module names 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: akpm@linux-foundation.org Date: Fri, 18 Sep 2009 12:49:27 -0700 MIME-Version: 1.0 X-Spam-Status: No, hits=-3.513 required=5 tests=AWL, BAYES_00, OSDL_HEADER_SUBJECT_BRACKETED X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.13 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org 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 "") {