[PATCH] Marker depmod fix core kernel list

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mathieu Desnoyers
Date: Friday, October 3, 2008 - 12:54 pm

* Theodore Ts'o (tytso@mit.edu) wrote:


I think the problem comes from this patch :
commit d35cb360c29956510b2fe1a953bd4968536f7216
"markers: fix duplicate modpost entry"

Especially :

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index a07f91a..8f038e6 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1992,7 +1992,8 @@ static void read_markers(const char *fname)
      mod->skip = 1;
    }

-   add_marker(mod, marker, fmt);
+   if (!mod->skip)
+     add_marker(mod, marker, fmt);
  }
  return;
 fail:

Here is a fix that should take care if this problem. Given I am not the
modpost expert, let's see if I can get an ACK from Sam.

Thanks for the bug report!

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
CC: Theodore Ts'o <tytso@mit.edu>
CC: David Smith <dsmith@redhat.com>
CC: Roland McGrath <roland@redhat.com>
CC: Sam Ravnborg <sam@ravnborg.org>
CC: Wenji Huang <wenji.huang@oracle.com>
CC: Takashi Nishiie <t-nishiie@np.css.fujitsu.com>
---
 scripts/mod/modpost.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: linux-2.6-lttng/scripts/mod/modpost.c
===================================================================
--- linux-2.6-lttng.orig/scripts/mod/modpost.c	2008-10-03 15:42:00.000000000 -0400
+++ linux-2.6-lttng/scripts/mod/modpost.c	2008-10-03 15:42:59.000000000 -0400
@@ -1986,11 +1986,13 @@ static void read_markers(const char *fna
 
 		mod = find_module(modname);
 		if (!mod) {
-			if (is_vmlinux(modname))
-				have_vmlinux = 1;
 			mod = new_module(NOFAIL(strdup(modname)));
 			mod->skip = 1;
 		}
+		if (is_vmlinux(modname)) {
+			have_vmlinux = 1;
+			mod->skip = 0;
+		}
 
 		if (!mod->skip)
 			add_marker(mod, marker, fmt);

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Markers in (non-module) kernel code?, Theodore Ts'o, (Fri Oct 3, 12:16 pm)
[PATCH] Marker depmod fix core kernel list, Mathieu Desnoyers, (Fri Oct 3, 12:54 pm)
Re: [PATCH] Marker depmod fix core kernel list, Theodore Tso, (Sat Oct 4, 8:24 am)
Re: [PATCH] Marker depmod fix core kernel list, Greg KH, (Sun Oct 5, 9:08 pm)
Re: [PATCH] Marker depmod fix core kernel list, Roland McGrath, (Mon Oct 6, 1:23 pm)
Re: [PATCH] Marker depmod fix core kernel list, Ingo Molnar, (Fri Oct 10, 2:39 am)
Re: [PATCH] Marker depmod fix core kernel list, Ingo Molnar, (Fri Oct 10, 2:39 am)
Re: [PATCH RESEND] early_ioremap has a fencepost error, Ingo Molnar, (Fri Oct 10, 3:21 am)
Re: [PATCH] Marker depmod fix core kernel list, Greg KH, (Fri Oct 10, 8:48 am)