* [PATCH] modules_install must not remove existing modules
@ 2006-04-05 21:33 Andreas Gruenbacher
2006-04-05 21:52 ` Valdis.Kletnieks
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Andreas Gruenbacher @ 2006-04-05 21:33 UTC (permalink / raw)
To: Sam Ravnborg, linux-kernel
When installing external modules with `make modules_install', the
first thing that happens is a rm -rf of the target directory. This
works only once, and breaks when installing more than one (set of)
external module(s). Bug introduced in:
http://www.kernel.org/hg/linux-2.6/?cs=bbb3915836f5
Sam, is this fix okay with you?
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Index: linux-2.6.16/Makefile
===================================================================
--- linux-2.6.16.orig/Makefile
+++ linux-2.6.16/Makefile
@@ -1131,7 +1131,6 @@ modules_install: _emodinst_ _emodinst_po
install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra)
.PHONY: _emodinst_
_emodinst_:
- $(Q)rm -rf $(MODLIB)/$(install-dir)
$(Q)mkdir -p $(MODLIB)/$(install-dir)
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst
--
Andreas Gruenbacher <agruen@suse.de>
Novell / SUSE Labs
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] modules_install must not remove existing modules
2006-04-05 21:33 [PATCH] modules_install must not remove existing modules Andreas Gruenbacher
@ 2006-04-05 21:52 ` Valdis.Kletnieks
2006-04-05 22:06 ` Andreas Gruenbacher
2006-04-05 22:33 ` Gene Heskett
2006-04-05 22:12 ` Sam Ravnborg
2006-04-06 6:43 ` Sam Ravnborg
2 siblings, 2 replies; 10+ messages in thread
From: Valdis.Kletnieks @ 2006-04-05 21:52 UTC (permalink / raw)
To: Andreas Gruenbacher; +Cc: Sam Ravnborg, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 654 bytes --]
On Wed, 05 Apr 2006 23:33:50 +0200, Andreas Gruenbacher said:
> When installing external modules with `make modules_install', the
> first thing that happens is a rm -rf of the target directory. This
> works only once, and breaks when installing more than one (set of)
> external module(s).
Can this be re-worked to ensure that it clears the target directory
the *first* time? It would suck mightily if a previous build of 2.6.17-rc2
left a net_foo.ko lying around to get insmod'ed by accident (consider the case
of CONFIG_NETFOO=m getting changed to y or n, and other possible horkage.
Module versioning will catch some, but not all, of this crap....)
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] modules_install must not remove existing modules
2006-04-05 21:52 ` Valdis.Kletnieks
@ 2006-04-05 22:06 ` Andreas Gruenbacher
2006-04-05 22:33 ` Gene Heskett
1 sibling, 0 replies; 10+ messages in thread
From: Andreas Gruenbacher @ 2006-04-05 22:06 UTC (permalink / raw)
To: Valdis.Kletnieks; +Cc: Sam Ravnborg, linux-kernel
On Wednesday 05 April 2006 23:52, Valdis.Kletnieks@vt.edu wrote:
> Can this be re-worked to ensure that it clears the target directory
> the *first* time? It would suck mightily if a previous build of 2.6.17-rc2
> left a net_foo.ko lying around to get insmod'ed by accident (consider the
> case of CONFIG_NETFOO=m getting changed to y or n, and other possible
> horkage. Module versioning will catch some, but not all, of this crap....)
We could wipe away everything in the non-external modules_install case (not
only everything below kernel/ as is done now). The problem here is that
different external modules_install calls into the same dir conflict.
Andreas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] modules_install must not remove existing modules
2006-04-05 21:52 ` Valdis.Kletnieks
2006-04-05 22:06 ` Andreas Gruenbacher
@ 2006-04-05 22:33 ` Gene Heskett
1 sibling, 0 replies; 10+ messages in thread
From: Gene Heskett @ 2006-04-05 22:33 UTC (permalink / raw)
To: linux-kernel
On Wednesday 05 April 2006 17:52, Valdis.Kletnieks@vt.edu wrote:
>On Wed, 05 Apr 2006 23:33:50 +0200, Andreas Gruenbacher said:
>> When installing external modules with `make modules_install', the
>> first thing that happens is a rm -rf of the target directory. This
>> works only once, and breaks when installing more than one (set of)
>> external module(s).
>
>Can this be re-worked to ensure that it clears the target directory
>the *first* time? It would suck mightily if a previous build of
> 2.6.17-rc2 left a net_foo.ko lying around to get insmod'ed by
> accident (consider the case of CONFIG_NETFOO=m getting changed to y
> or n, and other possible horkage. Module versioning will catch some,
> but not all, of this crap....)
I avoid this in my own makeit script by mv'ing all that stuff to
a /lib/modules/version_number.old, ditto for vmlinuz and initrd. That
way, if the new one doesn't work, I can choose some other kernel in the
grub startup, boot it it, then just mv the stuff back, and voila!
Another reboot and I'm back on the last kernel that worked.
--
Cheers, Gene
People having trouble with vz bouncing email to me should add the word
'online' between the 'verizon', and the dot which bypasses vz's
stupid bounce rules. I do use spamassassin too. :-)
Yahoo.com and AOL/TW attorneys please note, additions to the above
message by Gene Heskett are:
Copyright 2006 by Maurice Eugene Heskett, all rights reserved.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] modules_install must not remove existing modules
2006-04-05 21:33 [PATCH] modules_install must not remove existing modules Andreas Gruenbacher
2006-04-05 21:52 ` Valdis.Kletnieks
@ 2006-04-05 22:12 ` Sam Ravnborg
2006-04-05 22:21 ` Andreas Gruenbacher
2006-04-06 4:04 ` Valdis.Kletnieks
2006-04-06 6:43 ` Sam Ravnborg
2 siblings, 2 replies; 10+ messages in thread
From: Sam Ravnborg @ 2006-04-05 22:12 UTC (permalink / raw)
To: Andreas Gruenbacher; +Cc: linux-kernel
On Wed, Apr 05, 2006 at 11:33:50PM +0200, Andreas Gruenbacher wrote:
> When installing external modules with `make modules_install', the
> first thing that happens is a rm -rf of the target directory. This
> works only once, and breaks when installing more than one (set of)
> external module(s). Bug introduced in:
> http://www.kernel.org/hg/linux-2.6/?cs=bbb3915836f5
>
> Sam, is this fix okay with you?
The removal was introduced to get rid of old modules from an earlier
build of the same kernel with potential more modules.
I was obvious when I played with an allmodconfig kernel IIRC.
The usecase you have in mind is with external modules only?
We could special case in that suation and avoid the removal.
I see no way to detect when it is OK to remove or not, so in the
principle of least suprise I prefer having the removal unconditional for
normal kernel builds, and no removal for external modules.
OK?
Sam
>
> Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
>
> Index: linux-2.6.16/Makefile
> ===================================================================
> --- linux-2.6.16.orig/Makefile
> +++ linux-2.6.16/Makefile
> @@ -1131,7 +1131,6 @@ modules_install: _emodinst_ _emodinst_po
> install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra)
> .PHONY: _emodinst_
> _emodinst_:
> - $(Q)rm -rf $(MODLIB)/$(install-dir)
> $(Q)mkdir -p $(MODLIB)/$(install-dir)
> $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst
>
> --
> Andreas Gruenbacher <agruen@suse.de>
> Novell / SUSE Labs
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] modules_install must not remove existing modules
2006-04-05 22:12 ` Sam Ravnborg
@ 2006-04-05 22:21 ` Andreas Gruenbacher
2006-04-06 4:04 ` Valdis.Kletnieks
1 sibling, 0 replies; 10+ messages in thread
From: Andreas Gruenbacher @ 2006-04-05 22:21 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: linux-kernel
On Thursday 06 April 2006 00:12, Sam Ravnborg wrote:
> The removal was introduced to get rid of old modules from an earlier
> build of the same kernel with potential more modules.
> I was obvious when I played with an allmodconfig kernel IIRC.
The in-tree modules all install below kernel/, so I don't see why removing the
external modules directory (extra or whatever) is necessary for that. It
might still be that there are other external modules
below /lib/modules/$KERNELRELEASE, though.
> The usecase you have in mind is with external modules only?
Yes, with more than one set of them, each of which using modules_install.
> We could special case in that suation and avoid the removal.
>
> I see no way to detect when it is OK to remove or not, so in the
> principle of least suprise I prefer having the removal unconditional for
> normal kernel builds, and no removal for external modules.
>
> OK?
That would be okay for me, yes.
Thanks,
Andreas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] modules_install must not remove existing modules
2006-04-05 22:12 ` Sam Ravnborg
2006-04-05 22:21 ` Andreas Gruenbacher
@ 2006-04-06 4:04 ` Valdis.Kletnieks
1 sibling, 0 replies; 10+ messages in thread
From: Valdis.Kletnieks @ 2006-04-06 4:04 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Andreas Gruenbacher, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 288 bytes --]
On Thu, 06 Apr 2006 00:12:29 +0200, Sam Ravnborg said:
> I see no way to detect when it is OK to remove or not, so in the
> principle of least suprise I prefer having the removal unconditional for
> normal kernel builds, and no removal for external modules.
That sounds workable to me.
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] modules_install must not remove existing modules
2006-04-05 21:33 [PATCH] modules_install must not remove existing modules Andreas Gruenbacher
2006-04-05 21:52 ` Valdis.Kletnieks
2006-04-05 22:12 ` Sam Ravnborg
@ 2006-04-06 6:43 ` Sam Ravnborg
2006-04-06 20:28 ` Randy.Dunlap
2 siblings, 1 reply; 10+ messages in thread
From: Sam Ravnborg @ 2006-04-06 6:43 UTC (permalink / raw)
To: Andreas Gruenbacher; +Cc: linux-kernel
On Wed, Apr 05, 2006 at 11:33:50PM +0200, Andreas Gruenbacher wrote:
> When installing external modules with `make modules_install', the
> first thing that happens is a rm -rf of the target directory. This
> works only once, and breaks when installing more than one (set of)
> external module(s). Bug introduced in:
> http://www.kernel.org/hg/linux-2.6/?cs=bbb3915836f5
>
> Sam, is this fix okay with you?
Applied.
We should document this somewhere...
Sam
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] modules_install must not remove existing modules
2006-04-06 6:43 ` Sam Ravnborg
@ 2006-04-06 20:28 ` Randy.Dunlap
2006-04-06 20:29 ` Sam Ravnborg
0 siblings, 1 reply; 10+ messages in thread
From: Randy.Dunlap @ 2006-04-06 20:28 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: agruen, linux-kernel
On Thu, 6 Apr 2006 08:43:10 +0200 Sam Ravnborg wrote:
> On Wed, Apr 05, 2006 at 11:33:50PM +0200, Andreas Gruenbacher wrote:
> > When installing external modules with `make modules_install', the
> > first thing that happens is a rm -rf of the target directory. This
> > works only once, and breaks when installing more than one (set of)
> > external module(s). Bug introduced in:
> > http://www.kernel.org/hg/linux-2.6/?cs=bbb3915836f5
> >
> > Sam, is this fix okay with you?
> Applied.
> We should document this somewhere...
Sam, did you apply the original patch from Andreas or some updated one?
---
~Randy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] modules_install must not remove existing modules
2006-04-06 20:28 ` Randy.Dunlap
@ 2006-04-06 20:29 ` Sam Ravnborg
0 siblings, 0 replies; 10+ messages in thread
From: Sam Ravnborg @ 2006-04-06 20:29 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: agruen, linux-kernel
On Thu, Apr 06, 2006 at 01:28:23PM -0700, Randy.Dunlap wrote:
> On Thu, 6 Apr 2006 08:43:10 +0200 Sam Ravnborg wrote:
>
> > On Wed, Apr 05, 2006 at 11:33:50PM +0200, Andreas Gruenbacher wrote:
> > > When installing external modules with `make modules_install', the
> > > first thing that happens is a rm -rf of the target directory. This
> > > works only once, and breaks when installing more than one (set of)
> > > external module(s). Bug introduced in:
> > > http://www.kernel.org/hg/linux-2.6/?cs=bbb3915836f5
> > >
> > > Sam, is this fix okay with you?
> > Applied.
> > We should document this somewhere...
>
> Sam, did you apply the original patch from Andreas or some updated one?
The original patch from Andreas.
It is not yet pushed - I need to sort out a few klibc related bits
first.
Sam
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-04-06 20:29 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-05 21:33 [PATCH] modules_install must not remove existing modules Andreas Gruenbacher
2006-04-05 21:52 ` Valdis.Kletnieks
2006-04-05 22:06 ` Andreas Gruenbacher
2006-04-05 22:33 ` Gene Heskett
2006-04-05 22:12 ` Sam Ravnborg
2006-04-05 22:21 ` Andreas Gruenbacher
2006-04-06 4:04 ` Valdis.Kletnieks
2006-04-06 6:43 ` Sam Ravnborg
2006-04-06 20:28 ` Randy.Dunlap
2006-04-06 20:29 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox