* 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* Re: oom-killer problem
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
0 siblings, 2 replies; 12+ messages in thread
From: Linus Torvalds @ 2006-06-26 23:05 UTC (permalink / raw)
To: Daniel Ritz; +Cc: Michal Piotrowski, Sam Ravnborg, linux-kernel
On Tue, 27 Jun 2006, Daniel Ritz wrote:
>
> reverting the attached patch fixes the problem...
Michal, can you also confirm that just doing a simple revert of that one
commit makes things work for you?
Sam, if I don't hear otherwise from you, and Michael confirms, I'll just
revert it for now, and you can figure out how to fix it without breakage?
Linus
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: oom-killer problem
2006-06-26 23:05 ` Linus Torvalds
@ 2006-06-26 23:42 ` Michal Piotrowski
2006-06-27 5:39 ` Sam Ravnborg
1 sibling, 0 replies; 12+ messages in thread
From: Michal Piotrowski @ 2006-06-26 23:42 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Daniel Ritz, Sam Ravnborg, linux-kernel
On 27/06/06, Linus Torvalds <torvalds@osdl.org> wrote:
>
>
> On Tue, 27 Jun 2006, Daniel Ritz wrote:
> >
> > reverting the attached patch fixes the problem...
>
> Michal, can you also confirm that just doing a simple revert of that one
> commit makes things work for you?
Yes I can confirm that.
(http://www.ussg.iu.edu/hypermail/linux/kernel/0606.3/0827.html)
>
> Sam, if I don't hear otherwise from you, and Michael confirms, I'll just
> revert it for now, and you can figure out how to fix it without breakage?
>
> Linus
>
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
* Re: oom-killer problem
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
1 sibling, 1 reply; 12+ messages in thread
From: Sam Ravnborg @ 2006-06-27 5:39 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Daniel Ritz, Michal Piotrowski, linux-kernel
On Mon, Jun 26, 2006 at 04:05:40PM -0700, Linus Torvalds wrote:
>
>
> On Tue, 27 Jun 2006, Daniel Ritz wrote:
> >
> > reverting the attached patch fixes the problem...
>
> Michal, can you also confirm that just doing a simple revert of that one
> commit makes things work for you?
>
> Sam, if I don't hear otherwise from you, and Michael confirms, I'll just
> revert it for now, and you can figure out how to fix it without breakage?
I will try to find time during the weekend to track down the cause of
this.
But by reverting said patch you also have to revert:
566f81ca598f80de03e80a9a743e94b65b4e017e
This is the patch where make -rR is enabled and that one initally caused
problems for ia64.
Sam
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: oom-killer problem
2006-06-27 5:39 ` Sam Ravnborg
@ 2006-06-27 12:21 ` Daniel Ritz
2006-06-28 1:15 ` Linus Torvalds
0 siblings, 1 reply; 12+ messages in thread
From: Daniel Ritz @ 2006-06-27 12:21 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Linus Torvalds, Michal Piotrowski, linux-kernel
On Tuesday 27 June 2006 07.39, Sam Ravnborg wrote:
> On Mon, Jun 26, 2006 at 04:05:40PM -0700, Linus Torvalds wrote:
> > On Tue, 27 Jun 2006, Daniel Ritz wrote:
> > >
> > > reverting the attached patch fixes the problem...
> >
> > Michal, can you also confirm that just doing a simple revert of that one
> > commit makes things work for you?
> >
> > Sam, if I don't hear otherwise from you, and Michael confirms, I'll just
> > revert it for now, and you can figure out how to fix it without breakage?
> I will try to find time during the weekend to track down the cause of
> this.
> But by reverting said patch you also have to revert:
> 566f81ca598f80de03e80a9a743e94b65b4e017e
>
> This is the patch where make -rR is enabled and that one initally caused
> problems for ia64.
>
> Sam
>
this little something on top (instead of reverting the patch) also fixes the
problem for me. because the module name depends on the name of module.mod.o
it's necessary to call basename twice on that, otherwise the name ends up
being module.mod
maybe we could also define basetarget in Kbuild.include as:
basetarget = $(basename $(basename $(notdir $@)))
but that might be too much...dunno
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 3cb445c..e66f6dc 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -117,7 +117,7 @@ quiet_modtag := $(empty) $(empty)
$(obj-m) : quiet_modtag := [M]
# Default for not multi-part modules
-modname = $(basetarget)
+modname = $(basename $(basetarget))
$(multi-objs-m) : modname = $(modname-multi)
$(multi-objs-m:.o=.i) : modname = $(modname-multi)
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index e83613e..17f3d31 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -72,7 +72,7 @@ # Declare generated files as targets for
# Step 5), compile all *.mod.c files
# modname is set to make c_flags define KBUILD_MODNAME
-modname = $(basetarget)
+modname = $(basename $(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* Re: oom-killer problem
2006-06-27 12:21 ` Daniel Ritz
@ 2006-06-28 1:15 ` Linus Torvalds
2006-06-28 1:42 ` Keith Owens
0 siblings, 1 reply; 12+ messages in thread
From: Linus Torvalds @ 2006-06-28 1:15 UTC (permalink / raw)
To: Daniel Ritz; +Cc: Sam Ravnborg, Michal Piotrowski, linux-kernel
On Tue, 27 Jun 2006, Daniel Ritz wrote:
>
> # Default for not multi-part modules
> -modname = $(basetarget)
> +modname = $(basename $(basetarget))
Is there some way to make it clear _what_ the suffix we expect to remove
actually is in GNU make? Ie the "shell" kind of "basename" logic.
Ie, I'd personally be happier with a
modname = $(basename $(basetarget) .mod)
kind of thing (yeah, this obviously does _not_ work)
Gah. I've happily been trying to avoid having to know all the GNU Makefile
magic. Sam, does Dans patch make sense and can you explain what went
wrong? I'd happily revert the revert and instead use Dans patch, I just
want to understand it..
Linus
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: oom-killer problem
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
0 siblings, 2 replies; 12+ messages in thread
From: Keith Owens @ 2006-06-28 1:42 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Daniel Ritz, Sam Ravnborg, Michal Piotrowski, linux-kernel
Linus Torvalds (on Tue, 27 Jun 2006 18:15:46 -0700 (PDT)) wrote:
>
>
>On Tue, 27 Jun 2006, Daniel Ritz wrote:
>>
>> # Default for not multi-part modules
>> -modname = $(basetarget)
>> +modname = $(basename $(basetarget))
>
>Is there some way to make it clear _what_ the suffix we expect to remove
>actually is in GNU make? Ie the "shell" kind of "basename" logic.
>
>Ie, I'd personally be happier with a
>
> modname = $(basename $(basetarget) .mod)
>
>kind of thing (yeah, this obviously does _not_ work)
modname = $(patsubst %.mod,%,$(basetarget))
should do it (untested).
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: oom-killer problem
2006-06-28 1:42 ` Keith Owens
@ 2006-06-28 13:37 ` Daniel Ritz
2006-07-02 18:12 ` Kyle Moffett
1 sibling, 0 replies; 12+ messages in thread
From: Daniel Ritz @ 2006-06-28 13:37 UTC (permalink / raw)
To: Keith Owens; +Cc: Linus Torvalds, Sam Ravnborg, Michal Piotrowski, linux-kernel
On Wednesday 28 June 2006 03.42, Keith Owens wrote:
> Linus Torvalds (on Tue, 27 Jun 2006 18:15:46 -0700 (PDT)) wrote:
> >
> >
> >On Tue, 27 Jun 2006, Daniel Ritz wrote:
> >>
> >> # Default for not multi-part modules
> >> -modname = $(basetarget)
> >> +modname = $(basename $(basetarget))
> >
> >Is there some way to make it clear _what_ the suffix we expect to remove
> >actually is in GNU make? Ie the "shell" kind of "basename" logic.
> >
> >Ie, I'd personally be happier with a
> >
> > modname = $(basename $(basetarget) .mod)
> >
> >kind of thing (yeah, this obviously does _not_ work)
>
> modname = $(patsubst %.mod,%,$(basetarget))
>
> should do it (untested).
>
yep, works fine.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: oom-killer problem
2006-06-28 1:42 ` Keith Owens
2006-06-28 13:37 ` Daniel Ritz
@ 2006-07-02 18:12 ` Kyle Moffett
1 sibling, 0 replies; 12+ messages in thread
From: Kyle Moffett @ 2006-07-02 18:12 UTC (permalink / raw)
To: Keith Owens
Cc: Linus Torvalds, Daniel Ritz, Sam Ravnborg, Michal Piotrowski,
linux-kernel
On Jun 27, 2006, at 21:42:13, Keith Owens wrote:
> Linus Torvalds (on Tue, 27 Jun 2006 18:15:46 -0700 (PDT)) wrote:
>> Ie, I'd personally be happier with a
>>
>> modname = $(basename $(basetarget) .mod)
>>
>> kind of thing (yeah, this obviously does _not_ work)
>
> modname = $(patsubst %.mod,%,$(basetarget))
Sorry to come in so late on this; this email's been sitting in my
outbox for a week. Here's a mildly simpler alternative:
modname = $(basetarget:.mod=)
A slightly more flexible alternative:
modname = $(basetarget:%.mod=%)
Cheers,
Kyle Moffett
^ 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
* Re: oom-killer problem
2006-06-26 20:06 Michal Piotrowski
@ 2006-06-26 20:36 ` Linus Torvalds
2006-06-26 22:24 ` Michal Piotrowski
0 siblings, 1 reply; 12+ messages in thread
From: Linus Torvalds @ 2006-06-26 20:36 UTC (permalink / raw)
To: Michal Piotrowski; +Cc: LKML
On Mon, 26 Jun 2006, Michal Piotrowski wrote:
>
> I have noticed a small problem with
> 2.6.17-5fd571cbc13db113bda26c20673e1ec54bfd26b4 - in fact, it doesn't
> work.
Well, it looks to me like you have IDE problems (and shaky hands ;)
Can you pinpoint when these things started happening? "git bisect" is your
friend..
Linus
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: oom-killer problem
2006-06-26 20:36 ` Linus Torvalds
@ 2006-06-26 22:24 ` Michal Piotrowski
0 siblings, 0 replies; 12+ messages in thread
From: Michal Piotrowski @ 2006-06-26 22:24 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Sam Ravnborg, LKML
On 26/06/06, Linus Torvalds <torvalds@osdl.org> wrote:
>
>
> On Mon, 26 Jun 2006, Michal Piotrowski wrote:
> >
> > I have noticed a small problem with
> > 2.6.17-5fd571cbc13db113bda26c20673e1ec54bfd26b4 - in fact, it doesn't
> > work.
>
> Well, it looks to me like you have IDE problems (and shaky hands ;)
>
> Can you pinpoint when these things started happening? "git bisect" is your
> friend..
[michal@ltg01-fedora linux-git]$ git-bisect bad
e5c44fd88c146755da6941d047de4d97651404a9
e5c44fd88c146755da6941d047de4d97651404a9 is first bad commit
commit e5c44fd88c146755da6941d047de4d97651404a9
Author: Sam Ravnborg <sam@mars.ravnborg.org>
Date: Sat Jun 24 22:50:18 2006 +0200
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>
:040000 040000 88f5ba77585f29510879579cf2737470e4f5eaef
a7e1133f110192016e5a34b123eb8929c2f5d40e M scripts
Please revert this commit.
BTW "git show e5c44fd88c146755da6941d047de4d97651404a9" doesn't show
any IDE specific changes.
>
> Linus
>
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®