mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: oom-killer problem
@ 2006-06-26 22:28 Daniel Ritz
  2006-06-26 23:05 ` Linus Torvalds
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Ritz @ 2006-06-26 22:28 UTC (permalink / raw)
  To: Michal Piotrowski, Linus Torvalds, Sam Ravnborg; +Cc: linux-kernel

hi

i got the same here. reason is a recent change that made modules always
shows as module.mod. it breaks modprobe and probably many scripts..besides
lsmod looking horrible.
stuff like this in modprobe.conf:
	install pcmcia_core /sbin/modprobe --ignore-install pcmcia_core; /sbin/modprobe pcmcia
makes modprobe fork/exec endlessly calling itself...until oom interrupts it...
reverting the attached patch fixes the problem...

rgds
-daniel


From: Sam Ravnborg <sam@mars.ravnborg.org>
Date: Sat, 24 Jun 2006 20:50:18 +0000 (+0200)
Subject: kbuild: fix make -rR breakage
X-Git-Url: http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=e5c44fd88c146755da6941d047de4d97651404a9

kbuild: fix make -rR breakage

make failed to supply the filename when using make -rR and using $(*F)
to get target filename without extension.
This bug was not reproduceable in small scale but using:
$(basename $(notdir $@)) fixes it with same functionality.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---

--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -13,6 +13,11 @@ space   := $(empty) $(empty)
 depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
 
 ###
+# basetarget equals the filename of the target with no extension.
+# So 'foo/bar.o' becomes 'bar'
+basetarget = $(basename $(notdir $@))
+
+###
 # Escape single quote for use in echo statements
 escsq = $(subst $(squote),'\$(squote)',$1)
 
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -117,7 +117,7 @@ $(real-objs-m:.o=.lst): quiet_modtag := 
 $(obj-m)              : quiet_modtag := [M]
 
 # Default for not multi-part modules
-modname = $(*F)
+modname = $(basetarget)
 
 $(multi-objs-m)         : modname = $(modname-multi)
 $(multi-objs-m:.o=.i)   : modname = $(modname-multi)
--- a/scripts/Makefile.host
+++ b/scripts/Makefile.host
@@ -80,8 +80,10 @@ obj-dirs += $(host-objdirs)
 #####
 # Handle options to gcc. Support building with separate output directory
 
-_hostc_flags   = $(HOSTCFLAGS)   $(HOST_EXTRACFLAGS)   $(HOSTCFLAGS_$(*F).o)
-_hostcxx_flags = $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) $(HOSTCXXFLAGS_$(*F).o)
+_hostc_flags   = $(HOSTCFLAGS)   $(HOST_EXTRACFLAGS)   \
+                 $(HOSTCFLAGS_$(basetarget).o)
+_hostcxx_flags = $(HOSTCXXFLAGS) $(HOST_EXTRACXXFLAGS) \
+                 $(HOSTCXXFLAGS_$(basetarget).o)
 
 ifeq ($(KBUILD_SRC),)
 __hostc_flags	= $(_hostc_flags)
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -82,12 +82,12 @@ obj-dirs	:= $(addprefix $(obj)/,$(obj-di
 #       than one module. In that case KBUILD_MODNAME will be set to foo_bar,
 #       where foo and bar are the name of the modules.
 name-fix = $(subst $(comma),_,$(subst -,_,$1))
-basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(*F)))"
+basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))"
 modname_flags  = $(if $(filter 1,$(words $(modname))),\
                  -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))")
 
-_c_flags       = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o)
-_a_flags       = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o)
+_c_flags       = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(basetarget).o)
+_a_flags       = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o)
 _cpp_flags     = $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS_$(@F))
 
 # If building the kernel in a separate objtree expand all occurrences
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -72,7 +72,7 @@ $(modules:.ko=.mod.c): __modpost ;
 # Step 5), compile all *.mod.c files
 
 # modname is set to make c_flags define KBUILD_MODNAME
-modname = $(*F)
+modname = $(basetarget)
 
 quiet_cmd_cc_o_c = CC      $@
       cmd_cc_o_c = $(CC) $(c_flags) $(CFLAGS_MODULE)	\

^ permalink raw reply	[flat|nested] 12+ messages in thread
* oom-killer problem
@ 2006-06-26 20:06 Michal Piotrowski
  2006-06-26 20:36 ` Linus Torvalds
  0 siblings, 1 reply; 12+ messages in thread
From: Michal Piotrowski @ 2006-06-26 20:06 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: LKML

Hi Linus,

I have noticed a small problem with
2.6.17-5fd571cbc13db113bda26c20673e1ec54bfd26b4 - in fact, it doesn't
work.

http://www.stardust.webpages.pl/files/linux/bug1.jpg
http://www.stardust.webpages.pl/files/linux/bug2.jpg

Here is a config file
http://www.stardust.webpages.pl/files/linux/config

Any ideas?

Regards,
Michal

-- 
Michal K. K. Piotrowski
LTG - Linux Testers Group
(http://www.stardust.webpages.pl/ltg/wiki/)

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

end of thread, other threads:[~2006-07-05  3:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-26 22:28 oom-killer problem Daniel Ritz
2006-06-26 23:05 ` Linus Torvalds
2006-06-26 23:42   ` Michal Piotrowski
2006-06-27  5:39   ` Sam Ravnborg
2006-06-27 12:21     ` Daniel Ritz
2006-06-28  1:15       ` Linus Torvalds
2006-06-28  1:42         ` Keith Owens
2006-06-28 13:37           ` Daniel Ritz
2006-07-02 18:12           ` Kyle Moffett
  -- strict thread matches above, loose matches on Subject: below --
2006-06-26 20:06 Michal Piotrowski
2006-06-26 20:36 ` Linus Torvalds
2006-06-26 22:24   ` Michal Piotrowski

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

all inboxes | Powered by JetHome®