* Re: Error during compile of 2.5.69-mm8 [not found] ` <20030522.213217.27796203.davem@redhat.com> @ 2003-05-24 14:36 ` Thomas Schlichter 2003-05-26 2:18 ` David S. Miller 0 siblings, 1 reply; 16+ messages in thread From: Thomas Schlichter @ 2003-05-24 14:36 UTC (permalink / raw) To: David S. Miller; +Cc: linux-kernel [-- Attachment #1.1: body text --] [-- Type: text/plain, Size: 960 bytes --] On Friday, 23 May 2003 06:32, David S. Miller wrote: > From: Thomas Schlichter <schlicht@uni-mannheim.de> > Date: Fri, 23 May 2003 05:38:38 +0200 > > OK, done... > > I already did it myself and sent the changes to Linus, he should pick > them up by tomorrow. Well it seems you missed one file that my patch would have cought. So here is a seperate diff to fix drivers/usb/media/pwc-if.c, too. I also attached a patch that fixes the SET_MODULE_OWNER thing for net/ipv4/ by using static initializers instead of performing the assignment at runtime. This should be no problem here, as SET_MODULE_OWNER was called from static init functions once. I also made 'esp4_init' static to be safe. This function is not called from anywhere else in the whole kernel tree. (That's whar grep says) Both patches should cleanly apply to current bk. For me it compiles and runs without any problems... Best regards Thomas Schlichter [-- Attachment #1.2: missed_wrong_SET_MODULE_OWNER.diff --] [-- Type: text/x-diff, Size: 366 bytes --] --- linux-2.5.69-bk/drivers/usb/media/pwc-if.c.orig Sat May 24 16:12:40 2003 +++ linux-2.5.69-bk/drivers/usb/media/pwc-if.c Sat May 24 16:13:43 2003 @@ -1804,7 +1804,7 @@ } memcpy(vdev, &pwc_template, sizeof(pwc_template)); strcpy(vdev->name, name); - SET_MODULE_OWNER(vdev); + vdev->owner = THIS_MODULE; pdev->vdev = vdev; vdev->priv = pdev; [-- Attachment #1.3: better_wrong_SET_MODULE_OWNER.diff --] [-- Type: text/x-diff, Size: 1685 bytes --] --- linux-2.5.69-bk/net/ipv4/esp.c.orig Sat May 24 16:14:29 2003 +++ linux-2.5.69-bk/net/ipv4/esp.c Sat May 24 16:13:43 2003 @@ -567,7 +567,7 @@ .no_policy = 1, }; -int __init esp4_init(void) +static int __init esp4_init(void) { struct xfrm_decap_state decap; @@ -578,7 +578,6 @@ decap_data_too_small(); } - esp_type.owner = THIS_MODULE; if (xfrm_register_type(&esp_type, AF_INET) < 0) { printk(KERN_INFO "ip esp init: can't add xfrm type\n"); return -EAGAIN; --- linux-2.5.69-bk/net/ipv4/ipcomp.c.orig Sat May 24 16:15:04 2003 +++ linux-2.5.69-bk/net/ipv4/ipcomp.c Sat May 24 16:13:43 2003 @@ -385,6 +385,7 @@ static struct xfrm_type ipcomp_type = { .description = "IPCOMP4", + .owner = THIS_MODULE, .proto = IPPROTO_COMP, .init_state = ipcomp_init_state, .destructor = ipcomp_destroy, @@ -400,7 +401,6 @@ static int __init ipcomp4_init(void) { - ipcomp_type.owner = THIS_MODULE; if (xfrm_register_type(&ipcomp_type, AF_INET) < 0) { printk(KERN_INFO "ipcomp init: can't add xfrm type\n"); return -EAGAIN; --- linux-2.5.69-bk/net/ipv4/xfrm4_tunnel.c.orig Sat May 24 16:15:34 2003 +++ linux-2.5.69-bk/net/ipv4/xfrm4_tunnel.c Sat May 24 16:13:43 2003 @@ -215,6 +215,7 @@ static struct xfrm_type ipip_type = { .description = "IPIP", + .owner = THIS_MODULE, .proto = IPPROTO_IPIP, .init_state = ipip_init_state, .destructor = ipip_destroy, @@ -229,7 +230,6 @@ static int __init ipip_init(void) { - ipip_type.owner = THIS_MODULE; if (xfrm_register_type(&ipip_type, AF_INET) < 0) { printk(KERN_INFO "ipip init: can't add xfrm type\n"); return -EAGAIN; [-- Attachment #2: signature --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Error during compile of 2.5.69-mm8 2003-05-24 14:36 ` Error during compile of 2.5.69-mm8 Thomas Schlichter @ 2003-05-26 2:18 ` David S. Miller 2003-05-26 6:35 ` Thomas Schlichter 0 siblings, 1 reply; 16+ messages in thread From: David S. Miller @ 2003-05-26 2:18 UTC (permalink / raw) To: schlicht; +Cc: linux-kernel From: Thomas Schlichter <schlicht@uni-mannheim.de> Date: Sat, 24 May 2003 16:36:59 +0200 I also attached a patch that fixes the SET_MODULE_OWNER thing for net/ipv4/ by using static initializers I can't apply these patches, there are errors. You remove the esp4_type->owner setting, but don't put the static initializer in there. I suppose you do test the changes you make in your patches, right? What was the test you made to make sure the esp4_type module ownership was set correctly? :-) ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Error during compile of 2.5.69-mm8 2003-05-26 2:18 ` David S. Miller @ 2003-05-26 6:35 ` Thomas Schlichter 2003-05-26 7:04 ` David S. Miller 0 siblings, 1 reply; 16+ messages in thread From: Thomas Schlichter @ 2003-05-26 6:35 UTC (permalink / raw) To: David S. Miller; +Cc: linux-kernel Am Montag, 26. Mai 2003 04:18 schrieb David S. Miller: > From: Thomas Schlichter <schlicht@uni-mannheim.de> > Date: Sat, 24 May 2003 16:36:59 +0200 > > I also attached a patch that fixes the SET_MODULE_OWNER thing for > net/ipv4/ by using static initializers > > I can't apply these patches, there are errors. You remove > the esp4_type->owner setting, but don't put the static initializer > in there. I created the patches against -mm8 with the SET_MODULE_OWNER lines modified by hand to match your patched version, so the patches apply here cleanly... > I suppose you do test the changes you make in your patches, right? > What was the test you made to make sure the esp4_type module ownership > was set correctly? :-) Well, I looked into the code... In version 1.26 of the file net/ipv4/esp.c rusty already added the static initializer into the struct. Best regards Thomas Schlichter ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Error during compile of 2.5.69-mm8 2003-05-26 6:35 ` Thomas Schlichter @ 2003-05-26 7:04 ` David S. Miller 0 siblings, 0 replies; 16+ messages in thread From: David S. Miller @ 2003-05-26 7:04 UTC (permalink / raw) To: schlicht; +Cc: linux-kernel From: Thomas Schlichter <schlicht@uni-mannheim.de> Date: Mon, 26 May 2003 08:35:53 +0200 In version 1.26 of the file net/ipv4/esp.c rusty already added the static initializer into the struct. My error, sorry I hadn't noticed that. Could you please resend the patches to me? I've misplaced the original copy. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Error during compile of 2.5.69-mm8
@ 2003-05-22 13:54 Mads Christensen
2003-05-22 15:29 ` Mads Christensen
[not found] ` <20030522160218.57b828db.akpm@digeo.com>
0 siblings, 2 replies; 16+ messages in thread
From: Mads Christensen @ 2003-05-22 13:54 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2064 bytes --]
Hello
Got this while i tried to compile the fucker!
gcc -Wp,-MD,init/.version.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-pipe -mpreferred-stack-boundary=2 -march=athlon
-Iinclude/asm-i386/mach-default -fomit-frame-pointer -nostdinc
-iwithprefix include -DKBUILD_BASENAME=version
-DKBUILD_MODNAME=version -c -o init/.tmp_version.o init/version.c
scripts/fixdep init/.version.o.d init/version.o 'gcc
-Wp,-MD,init/.version.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-pipe -mpreferred-stack-boundary=2 -march=athlon
-Iinclude/asm-i386/mach-default -fomit-frame-pointer -nostdinc
-iwithprefix include -DKBUILD_BASENAME=version
-DKBUILD_MODNAME=version -c -o init/.tmp_version.o init/version.c' >
init/.version.o.tmp; rm -f init/.version.o.d; mv -f init/.version.o.tmp
init/.version.o.cmd
ld -m elf_i386 -r -o init/built-in.o init/main.o init/version.o
init/mounts.o init/initramfs.o
ld -m elf_i386 -T arch/i386/vmlinux.lds.s
arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/built-in.o
--start-group usr/built-in.o arch/i386/kernel/built-in.o
arch/i386/mm/built-in.o arch/i386/mach-default/built-in.o
kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o
security/built-in.o crypto/built-in.o lib/lib.a arch/i386/lib/lib.a
drivers/built-in.o sound/built-in.o arch/i386/pci/built-in.o
net/built-in.o --end-group -o vmlinux
arch/i386/kernel/built-in.o(.init.text+0x5521): In function `apm_init':
: undefined reference to `SET_MODULE_OWNER'
make[1]: *** [vmlinux] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.69-mm8'
make: *** [stamp-build] Error 2
Thanks in advance!
--
===================================================
| Mads F. Christensen || |
| Email: || mfc@krycek.org |
| Webdesign Development || www.krycek.org |
===================================================
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: Error during compile of 2.5.69-mm8 2003-05-22 13:54 Mads Christensen @ 2003-05-22 15:29 ` Mads Christensen 2003-05-22 23:10 ` Thomas Schlichter [not found] ` <20030522160218.57b828db.akpm@digeo.com> 1 sibling, 1 reply; 16+ messages in thread From: Mads Christensen @ 2003-05-22 15:29 UTC (permalink / raw) To: linux-kernel [-- Attachment #1: Type: text/plain, Size: 2325 bytes --] Hey! Well you can fix it by either compiling apm as a module or not compiling apm at all =) Best Regards Mads Christensen On tor, 2003-05-22 at 15:54, Mads Christensen wrote: > Hello > > Got this while i tried to compile the fucker! > > gcc -Wp,-MD,init/.version.o.d -D__KERNEL__ -Iinclude -Wall > -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common > -pipe -mpreferred-stack-boundary=2 -march=athlon > -Iinclude/asm-i386/mach-default -fomit-frame-pointer -nostdinc > -iwithprefix include -DKBUILD_BASENAME=version > -DKBUILD_MODNAME=version -c -o init/.tmp_version.o init/version.c > scripts/fixdep init/.version.o.d init/version.o 'gcc > -Wp,-MD,init/.version.o.d -D__KERNEL__ -Iinclude -Wall > -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common > -pipe -mpreferred-stack-boundary=2 -march=athlon > -Iinclude/asm-i386/mach-default -fomit-frame-pointer -nostdinc > -iwithprefix include -DKBUILD_BASENAME=version > -DKBUILD_MODNAME=version -c -o init/.tmp_version.o init/version.c' > > init/.version.o.tmp; rm -f init/.version.o.d; mv -f init/.version.o.tmp > init/.version.o.cmd > ld -m elf_i386 -r -o init/built-in.o init/main.o init/version.o > init/mounts.o init/initramfs.o > ld -m elf_i386 -T arch/i386/vmlinux.lds.s > arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/built-in.o > --start-group usr/built-in.o arch/i386/kernel/built-in.o > arch/i386/mm/built-in.o arch/i386/mach-default/built-in.o > kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o > security/built-in.o crypto/built-in.o lib/lib.a arch/i386/lib/lib.a > drivers/built-in.o sound/built-in.o arch/i386/pci/built-in.o > net/built-in.o --end-group -o vmlinux > arch/i386/kernel/built-in.o(.init.text+0x5521): In function `apm_init': > : undefined reference to `SET_MODULE_OWNER' > make[1]: *** [vmlinux] Error 1 > make[1]: Leaving directory `/usr/src/linux-2.4.69-mm8' > make: *** [stamp-build] Error 2 > > > Thanks in advance! -- =================================================== | Mads F. Christensen || | | Email: || mfc@krycek.org | | Webdesign Development || www.krycek.org | =================================================== [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Error during compile of 2.5.69-mm8 2003-05-22 15:29 ` Mads Christensen @ 2003-05-22 23:10 ` Thomas Schlichter 0 siblings, 0 replies; 16+ messages in thread From: Thomas Schlichter @ 2003-05-22 23:10 UTC (permalink / raw) To: Mads Christensen, davem; +Cc: Andrew Morton, linux-kernel [-- Attachment #1.1: body text --] [-- Type: text/plain, Size: 3196 bytes --] Hi! On May 22, Mads Christensen wrote: > Hey! > > Well you can fix it by either compiling apm as a module or not compiling > apm at all =) Well, I Don't think this really is a fix, it's just a workaround for a problen introduced with ChangeSet@1.1167. With that the definition of SET_MODULE_OWNER was removed from the file include/linux/module.h and an empty one was added to the file include/linux/netdevice.h. This was done because the 'owner' field was removed from the 'struct net_device'. This broke all other places where SET_MODULE_OWNER was also used... I made the attached patch against 2.5.69-mm8 that adds the original definition back to include/linux/module.h and removes all the places where it must not be called anymore due to the missing owner field... I hope this was the real intention of the ChangeSet mentioned above, and I did not miss any false occurrence. (The most SET_MODULE_OWNER calls are now in the isdn subtree) For me it compiles and works fine... ;-) > Best Regards > Mads Christensen Best regards, too... Thomas Schlichter P.S.: Sorry that I had to GZIP the patch, but else it would have been too large... > On tor, 2003-05-22 at 15:54, Mads Christensen wrote: > > Hello > > > > Got this while i tried to compile the fucker! > > > > gcc -Wp,-MD,init/.version.o.d -D__KERNEL__ -Iinclude -Wall > > -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common > > -pipe -mpreferred-stack-boundary=2 -march=athlon > > -Iinclude/asm-i386/mach-default -fomit-frame-pointer -nostdinc > > -iwithprefix include -DKBUILD_BASENAME=version > > -DKBUILD_MODNAME=version -c -o init/.tmp_version.o init/version.c > > scripts/fixdep init/.version.o.d init/version.o 'gcc > > -Wp,-MD,init/.version.o.d -D__KERNEL__ -Iinclude -Wall > > -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common > > -pipe -mpreferred-stack-boundary=2 -march=athlon > > -Iinclude/asm-i386/mach-default -fomit-frame-pointer -nostdinc > > -iwithprefix include -DKBUILD_BASENAME=version > > -DKBUILD_MODNAME=version -c -o init/.tmp_version.o init/version.c' > > > init/.version.o.tmp; rm -f init/.version.o.d; mv -f init/.version.o.tmp > > init/.version.o.cmd > > ld -m elf_i386 -r -o init/built-in.o init/main.o init/version.o > > init/mounts.o init/initramfs.o > > ld -m elf_i386 -T arch/i386/vmlinux.lds.s > > arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/built-in.o > > --start-group usr/built-in.o arch/i386/kernel/built-in.o > > arch/i386/mm/built-in.o arch/i386/mach-default/built-in.o > > kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o > > security/built-in.o crypto/built-in.o lib/lib.a arch/i386/lib/lib.a > > drivers/built-in.o sound/built-in.o arch/i386/pci/built-in.o > > net/built-in.o --end-group -o vmlinux > > > > arch/i386/kernel/built-in.o(.init.text+0x5521): In function `apm_init': > > : undefined reference to `SET_MODULE_OWNER' > > > > make[1]: *** [vmlinux] Error 1 > > make[1]: Leaving directory `/usr/src/linux-2.4.69-mm8' > > make: *** [stamp-build] Error 2 > > > > > > Thanks in advance! [-- Attachment #1.2: SET_MODULE_OWNER.diff.gz --] [-- Type: application/x-gzip, Size: 17020 bytes --] [-- Attachment #2: signature --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <20030522160218.57b828db.akpm@digeo.com>]
* Re: Error during compile of 2.5.69-mm8 [not found] ` <20030522160218.57b828db.akpm@digeo.com> @ 2003-05-22 23:05 ` David S. Miller 2003-05-22 23:28 ` Thomas Schlichter 0 siblings, 1 reply; 16+ messages in thread From: David S. Miller @ 2003-05-22 23:05 UTC (permalink / raw) To: akpm; +Cc: mfc, linux-kernel From: Andrew Morton <akpm@digeo.com> Date: Thu, 22 May 2003 16:02:18 -0700 Looks like David converted this macro into a no-op, then moved it into netdevice.h. Problem is, some non-network drivers were using it too. They shouldn't, it's backwards compatability crap for net drivers only. Use explicit ->owner references elsewhere. Maybe we should put it back the way it was and go edit all the netdrivers? Absolutely not. Yoshfuji posted a patch on linux-kernel to fix this already. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Error during compile of 2.5.69-mm8 2003-05-22 23:05 ` David S. Miller @ 2003-05-22 23:28 ` Thomas Schlichter 2003-05-22 23:29 ` David S. Miller 0 siblings, 1 reply; 16+ messages in thread From: Thomas Schlichter @ 2003-05-22 23:28 UTC (permalink / raw) To: David S. Miller, akpm; +Cc: mfc, linux-kernel [-- Attachment #1: signed data --] [-- Type: text/plain, Size: 1025 bytes --] Hi, On May 23, David S. Miller wrote: > From: Andrew Morton <akpm@digeo.com> > Date: Thu, 22 May 2003 16:02:18 -0700 > > Looks like David converted this macro into a no-op, then moved it into > netdevice.h. > > Problem is, some non-network drivers were using it too. > > They shouldn't, it's backwards compatability crap for net drivers > only. Use explicit ->owner references elsewhere. Well, as mentioned in my other mail there ARE many occurrences of SET_MODULE_OWNER, for example in the ISDN subtree (just give 'grep' a try)... > Maybe we should put it back the way it was and go edit all the > netdrivers? > > Absolutely not. Oops, that's what the patch in my other mail does... > Yoshfuji posted a patch on linux-kernel to fix this already. Sorry, I must have missed this patch - that would have made my work obsolete - but I'd like to see how that supports all the other SET_MODULE_OWNER calls from all the other places... Best regards Thomas Schlichter [-- Attachment #2: signature --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Error during compile of 2.5.69-mm8 2003-05-22 23:28 ` Thomas Schlichter @ 2003-05-22 23:29 ` David S. Miller 2003-05-22 23:47 ` Thomas Schlichter 0 siblings, 1 reply; 16+ messages in thread From: David S. Miller @ 2003-05-22 23:29 UTC (permalink / raw) To: schlicht; +Cc: akpm, mfc, linux-kernel From: Thomas Schlichter <schlicht@uni-mannheim.de> Date: Fri, 23 May 2003 01:28:06 +0200 On May 23, David S. Miller wrote: > Yoshfuji posted a patch on linux-kernel to fix this already. Sorry, I must have missed this patch - that would have made my work obsolete - but I'd like to see how that supports all the other SET_MODULE_OWNER calls from all the other places... They also should be converted to explicit ->owner references. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Error during compile of 2.5.69-mm8 2003-05-22 23:29 ` David S. Miller @ 2003-05-22 23:47 ` Thomas Schlichter 2003-05-22 23:48 ` David S. Miller 0 siblings, 1 reply; 16+ messages in thread From: Thomas Schlichter @ 2003-05-22 23:47 UTC (permalink / raw) To: David S. Miller; +Cc: akpm, mfc, linux-kernel [-- Attachment #1: signed data --] [-- Type: text/plain, Size: 1160 bytes --] On May 23, David S. Miller wrote: > From: Thomas Schlichter <schlicht@uni-mannheim.de> > Date: Fri, 23 May 2003 01:28:06 +0200 > > On May 23, David S. Miller wrote: > > Yoshfuji posted a patch on linux-kernel to fix this already. > > Sorry, I must have missed this patch - that would have made my work > obsolete - > but I'd like to see how that supports all the other > SET_MODULE_OWNER calls from all the other places... > > They also should be converted to explicit ->owner references. Well, I don't think so... I don't like it if there is a possibility doing it with an initializer, but in other cases it may increase readability, too... There was a discussion about SET_MODULE_OWNER here on the list, once. You can find it here: http://marc.theaimsgroup.com/?t=104969843600002&r=1&w=2 At the end Rusty made a small patch that never made it into the mainline tree (even if I think it should have...) His mail with the patch can be found at: http://marc.theaimsgroup.com/?l=linux-kernel&m=105065084724249&w=2 (I like the analogy to a mainframe ;-) Best regards Thomas Schlichter [-- Attachment #2: signature --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Error during compile of 2.5.69-mm8 2003-05-22 23:47 ` Thomas Schlichter @ 2003-05-22 23:48 ` David S. Miller 2003-05-23 0:13 ` Thomas Schlichter 0 siblings, 1 reply; 16+ messages in thread From: David S. Miller @ 2003-05-22 23:48 UTC (permalink / raw) To: schlicht; +Cc: akpm, mfc, linux-kernel From: Thomas Schlichter <schlicht@uni-mannheim.de> Date: Fri, 23 May 2003 01:47:00 +0200 There was a discussion about SET_MODULE_OWNER here on the list, once. You can find it here: I know about it and in fact Rusty is the one that told me to do what I did with SET_MODULE_OWNER. FACT: SET_MODULE_OWNER() tracks how to set the module reference for a struct netdevice. It always lived in netdevice.h and always served exactly this purpose. So when I deleted ->owner from struct netdevice, SET_MODULE_OWNER became a nop. Therefore, it was a complete error for anyone else to start using this macro for other structures. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Error during compile of 2.5.69-mm8 2003-05-22 23:48 ` David S. Miller @ 2003-05-23 0:13 ` Thomas Schlichter 2003-05-23 0:23 ` David S. Miller 0 siblings, 1 reply; 16+ messages in thread From: Thomas Schlichter @ 2003-05-23 0:13 UTC (permalink / raw) To: David S. Miller; +Cc: akpm, mfc, linux-kernel [-- Attachment #1: signed data --] [-- Type: text/plain, Size: 1349 bytes --] On May 23, David S. Miller wrote: > From: Thomas Schlichter <schlicht@uni-mannheim.de> > Date: Fri, 23 May 2003 01:47:00 +0200 > > There was a discussion about SET_MODULE_OWNER here on the list, once. > You can find it here: > > I know about it and in fact Rusty is the one that told me > to do what I did with SET_MODULE_OWNER. > > FACT: SET_MODULE_OWNER() tracks how to set the module reference > for a struct netdevice. > > It always lived in netdevice.h and always served exactly this purpose. As far as I can see it lived in modules.h... (Even in 2.4.10 if the sources here on my disk don't lie) So nothing (not even the name) indicated its membership to netdevice for a very long time! > So when I deleted ->owner from struct netdevice, SET_MODULE_OWNER > became a nop. For netdevice you are right! > Therefore, it was a complete error for anyone else to start using this > macro for other structures. So nobody should better use THIS_MODULE?! Well it currently is defined in module.h, but perhaps it was first defined in isdn.h and may be removed by its maintainer when he thinks he does not need it anymore... For ME and many other driver developers SET_MODULE_OWNER does not belong to netdevice, it belongs to the module infrastructure! Best regards Thomas Schlichter [-- Attachment #2: signature --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Error during compile of 2.5.69-mm8 2003-05-23 0:13 ` Thomas Schlichter @ 2003-05-23 0:23 ` David S. Miller 2003-05-23 1:06 ` Thomas Schlichter 0 siblings, 1 reply; 16+ messages in thread From: David S. Miller @ 2003-05-23 0:23 UTC (permalink / raw) To: schlicht; +Cc: akpm, mfc, linux-kernel From: Thomas Schlichter <schlicht@uni-mannheim.de> Date: Fri, 23 May 2003 02:13:34 +0200 > Therefore, it was a complete error for anyone else to start using this > macro for other structures. So nobody should better use THIS_MODULE?! No, it is exactly what they should use. They should avoid using SET_MODULE_OWNER. For ME and many other driver developers SET_MODULE_OWNER does not belong to netdevice, it belongs to the module infrastructure! Then by changing SET_MODULE_OWNER you will break source backwards compatability for every single network device driver out there, something I was explicitly trying to avoid. SET_MODULE_OWNER() is a bogus interface because it is typeless. Therefore I suggest that you create macros specific to your individual structures, and use these to achieve 2.4.x/2.5.x build compatability in setting the ->owner field of such structs. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Error during compile of 2.5.69-mm8 2003-05-23 0:23 ` David S. Miller @ 2003-05-23 1:06 ` Thomas Schlichter 2003-05-23 1:16 ` David S. Miller 0 siblings, 1 reply; 16+ messages in thread From: Thomas Schlichter @ 2003-05-23 1:06 UTC (permalink / raw) To: David S. Miller; +Cc: akpm, mfc, linux-kernel [-- Attachment #1.1: body text --] [-- Type: text/plain, Size: 1406 bytes --] On May 23, David S. Miller wrote: > From: Thomas Schlichter <schlicht@uni-mannheim.de> > Date: Fri, 23 May 2003 02:13:34 +0200 > > > Therefore, it was a complete error for anyone else to start using this > > macro for other structures. > > So nobody should better use THIS_MODULE?! > > No, it is exactly what they should use. > > They should avoid using SET_MODULE_OWNER. This is clear to me, of course, it should have been just a very extreme example... > For ME and many other driver developers SET_MODULE_OWNER does not belong > to netdevice, it belongs to the module infrastructure! > > Then by changing SET_MODULE_OWNER you will break source backwards > compatability for every single network device driver out there, > something I was explicitly trying to avoid. OK, now I see clearer... What you did broke everything but netdevices and what I did broke nothing but netdevices... So I attached a very small patch that will help braking nothing... ;-) > SET_MODULE_OWNER() is a bogus interface because it is typeless. > > Therefore I suggest that you create macros specific to your individual > structures, and use these to achieve 2.4.x/2.5.x build compatability > in setting the ->owner field of such structs. That is a good idea, but how should we get rid off this when it is used over and over?? Best regards Thomas Schlichter [-- Attachment #1.2: SET_MODULE_OWNER.diff --] [-- Type: text/x-diff, Size: 887 bytes --] --- linux-2.5.69-bk15/include/linux/module.h.orig Fri May 23 02:42:07 2003 +++ linux-2.5.69-bk15/include/linux/module.h Fri May 23 02:45:39 2003 @@ -438,6 +438,10 @@ #define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x) +#ifndef SET_MODULE_OWNER +#define SET_MODULE_OWNER(dev) ((dev)->owner = THIS_MODULE) +#endif + /* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */ struct obsolete_modparm { --- linux-2.5.69-bk15/include/linux/netdevice.h.orig Fri May 23 02:48:53 2003 +++ linux-2.5.69-bk15/include/linux/netdevice.h Fri May 23 02:49:06 2003 @@ -451,6 +451,7 @@ struct kobject stats_kobj; }; +#undef SET_MODULE_OWNER #define SET_MODULE_OWNER(dev) do { } while (0) /* Set the sysfs physical device reference for the network logical device * if set prior to registration will cause a symlink during initialization. [-- Attachment #2: signature --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Error during compile of 2.5.69-mm8 2003-05-23 1:06 ` Thomas Schlichter @ 2003-05-23 1:16 ` David S. Miller 0 siblings, 0 replies; 16+ messages in thread From: David S. Miller @ 2003-05-23 1:16 UTC (permalink / raw) To: schlicht; +Cc: akpm, mfc, linux-kernel From: Thomas Schlichter <schlicht@uni-mannheim.de> Date: Fri, 23 May 2003 03:06:45 +0200 So I attached a very small patch that will help braking nothing... ;-) No it breaks everything, module.h is always included before netdevice.h. This isn't how to solve this problem, I showed you how it can be done by definiting type-specific macros. ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2003-05-26 6:51 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200305230327.57985.schlicht@uni-mannheim.de>
[not found] ` <200305230538.38946.schlicht@uni-mannheim.de>
[not found] ` <20030522.213217.27796203.davem@redhat.com>
2003-05-24 14:36 ` Error during compile of 2.5.69-mm8 Thomas Schlichter
2003-05-26 2:18 ` David S. Miller
2003-05-26 6:35 ` Thomas Schlichter
2003-05-26 7:04 ` David S. Miller
2003-05-22 13:54 Mads Christensen
2003-05-22 15:29 ` Mads Christensen
2003-05-22 23:10 ` Thomas Schlichter
[not found] ` <20030522160218.57b828db.akpm@digeo.com>
2003-05-22 23:05 ` David S. Miller
2003-05-22 23:28 ` Thomas Schlichter
2003-05-22 23:29 ` David S. Miller
2003-05-22 23:47 ` Thomas Schlichter
2003-05-22 23:48 ` David S. Miller
2003-05-23 0:13 ` Thomas Schlichter
2003-05-23 0:23 ` David S. Miller
2003-05-23 1:06 ` Thomas Schlichter
2003-05-23 1:16 ` David S. Miller
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.