* BUG: sleeping function called from invalid context at kernel/fork.c:385
@ 2007-05-23 6:31 David Chinner
2007-05-23 6:43 ` Andrew Morton
0 siblings, 1 reply; 41+ messages in thread
From: David Chinner @ 2007-05-23 6:31 UTC (permalink / raw)
To: lkml
Saw this when running strace -f on a script on 2.6.21 on ia64:
BUG: sleeping function called from invalid context at kernel/fork.c:385
in_atomic():1, irqs_disabled():0
Call Trace:
[<a000000100014700>] show_stack+0x80/0xa0
sp=e00000306e6f7a00 bsp=e00000306e6f0ef8
[<a000000100014750>] dump_stack+0x30/0x60
sp=e00000306e6f7bd0 bsp=e00000306e6f0ee0
[<a0000001000acaf0>] __might_sleep+0x1f0/0x260
sp=e00000306e6f7bd0 bsp=e00000306e6f0eb8
[<a0000001000bd2e0>] mmput+0x20/0x220
sp=e00000306e6f7bd0 bsp=e00000306e6f0e90
[<a0000001000321e0>] sys_ptrace+0x460/0x1600
sp=e00000306e6f7bd0 bsp=e00000306e6f0d80
[<a00000010000bc40>] ia64_ret_from_syscall+0x0/0x20
sp=e00000306e6f7e30 bsp=e00000306e6f0d80
[<a000000000010620>] __kernel_syscall_via_break+0x0/0x20
sp=e00000306e6f8000 bsp=e00000306e6f0d80
BUG: sleeping function called from invalid context at kernel/fork.c:385
in_atomic():1, irqs_disabled():0
Call Trace:
[<a000000100014700>] show_stack+0x80/0xa0
sp=e00000306e6f7a00 bsp=e00000306e6f0ef8
[<a000000100014750>] dump_stack+0x30/0x60
sp=e00000306e6f7bd0 bsp=e00000306e6f0ee0
[<a0000001000acaf0>] __might_sleep+0x1f0/0x260
sp=e00000306e6f7bd0 bsp=e00000306e6f0eb8
[<a0000001000bd2e0>] mmput+0x20/0x220
sp=e00000306e6f7bd0 bsp=e00000306e6f0e90
[<a0000001000321e0>] sys_ptrace+0x460/0x1600
sp=e00000306e6f7bd0 bsp=e00000306e6f0d80
[<a00000010000bc40>] ia64_ret_from_syscall+0x0/0x20
sp=e00000306e6f7e30 bsp=e00000306e6f0d80
[<a000000000010620>] __kernel_syscall_via_break+0x0/0x20
sp=e00000306e6f8000 bsp=e00000306e6f0d80
I could reproduce it via 'strace -f sleep 1'
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
^ permalink raw reply [flat|nested] 41+ messages in thread* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-23 6:31 BUG: sleeping function called from invalid context at kernel/fork.c:385 David Chinner @ 2007-05-23 6:43 ` Andrew Morton 2007-05-23 17:44 ` Luck, Tony 0 siblings, 1 reply; 41+ messages in thread From: Andrew Morton @ 2007-05-23 6:43 UTC (permalink / raw) To: David Chinner; +Cc: lkml, linux-ia64 On Wed, 23 May 2007 16:31:54 +1000 David Chinner <dgc@sgi.com> wrote: > Saw this when running strace -f on a script on 2.6.21 on ia64: > > BUG: sleeping function called from invalid context at kernel/fork.c:385 > in_atomic():1, irqs_disabled():0 > > Call Trace: > [<a000000100014700>] show_stack+0x80/0xa0 > sp=e00000306e6f7a00 bsp=e00000306e6f0ef8 > [<a000000100014750>] dump_stack+0x30/0x60 > sp=e00000306e6f7bd0 bsp=e00000306e6f0ee0 > [<a0000001000acaf0>] __might_sleep+0x1f0/0x260 > sp=e00000306e6f7bd0 bsp=e00000306e6f0eb8 > [<a0000001000bd2e0>] mmput+0x20/0x220 > sp=e00000306e6f7bd0 bsp=e00000306e6f0e90 > [<a0000001000321e0>] sys_ptrace+0x460/0x1600 > sp=e00000306e6f7bd0 bsp=e00000306e6f0d80 > [<a00000010000bc40>] ia64_ret_from_syscall+0x0/0x20 > sp=e00000306e6f7e30 bsp=e00000306e6f0d80 > [<a000000000010620>] __kernel_syscall_via_break+0x0/0x20 > sp=e00000306e6f8000 bsp=e00000306e6f0d80 > BUG: sleeping function called from invalid context at kernel/fork.c:385 > in_atomic():1, irqs_disabled():0 > > Call Trace: > [<a000000100014700>] show_stack+0x80/0xa0 > sp=e00000306e6f7a00 bsp=e00000306e6f0ef8 > [<a000000100014750>] dump_stack+0x30/0x60 > sp=e00000306e6f7bd0 bsp=e00000306e6f0ee0 > [<a0000001000acaf0>] __might_sleep+0x1f0/0x260 > sp=e00000306e6f7bd0 bsp=e00000306e6f0eb8 > [<a0000001000bd2e0>] mmput+0x20/0x220 > sp=e00000306e6f7bd0 bsp=e00000306e6f0e90 > [<a0000001000321e0>] sys_ptrace+0x460/0x1600 > sp=e00000306e6f7bd0 bsp=e00000306e6f0d80 > [<a00000010000bc40>] ia64_ret_from_syscall+0x0/0x20 > sp=e00000306e6f7e30 bsp=e00000306e6f0d80 > [<a000000000010620>] __kernel_syscall_via_break+0x0/0x20 > sp=e00000306e6f8000 bsp=e00000306e6f0d80 > > I could reproduce it via 'strace -f sleep 1' > I'd say this is specific to ia64. Someone would have spotted it on x86 by now. ^ permalink raw reply [flat|nested] 41+ messages in thread
* RE: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-23 6:43 ` Andrew Morton @ 2007-05-23 17:44 ` Luck, Tony 2007-05-30 3:30 ` David Chinner 0 siblings, 1 reply; 41+ messages in thread From: Luck, Tony @ 2007-05-23 17:44 UTC (permalink / raw) To: Andrew Morton, David Chinner; +Cc: lkml, linux-ia64 > > Saw this when running strace -f on a script on 2.6.21 on ia64: > > > > BUG: sleeping function called from invalid context at kernel/fork.c:385 > > in_atomic():1, irqs_disabled():0 ... snip ... > > I could reproduce it via 'strace -f sleep 1' > > > > I'd say this is specific to ia64. Someone would have spotted it on > x86 by now. I tried the "strace -f sleep 1" on 2.6.22-rc2, and I didn't see this "BUG" there. Can you try your other test cases on the latest kernel. If it has already been fixed we can see about identifying the patch for possible backport to 2.6.21.stable -Tony ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-23 17:44 ` Luck, Tony @ 2007-05-30 3:30 ` David Chinner 2007-05-30 4:44 ` David Chinner 0 siblings, 1 reply; 41+ messages in thread From: David Chinner @ 2007-05-30 3:30 UTC (permalink / raw) To: Luck, Tony; +Cc: Andrew Morton, David Chinner, lkml, linux-ia64 On Wed, May 23, 2007 at 10:44:16AM -0700, Luck, Tony wrote: > > > Saw this when running strace -f on a script on 2.6.21 on ia64: > > > > > > BUG: sleeping function called from invalid context at kernel/fork.c:385 > > > in_atomic():1, irqs_disabled():0 > ... snip ... > > > I could reproduce it via 'strace -f sleep 1' > > > > > > > I'd say this is specific to ia64. Someone would have spotted it on > > x86 by now. > > I tried the "strace -f sleep 1" on 2.6.22-rc2, and I didn't see this "BUG" > there. Can you try your other test cases on the latest kernel. If it has > already been fixed we can see about identifying the patch for possible backport > to 2.6.21.stable Sorry for taking so long to get back to this - I still see this in 2.6.22-rc2. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-30 3:30 ` David Chinner @ 2007-05-30 4:44 ` David Chinner 2007-05-30 20:11 ` Luck, Tony 0 siblings, 1 reply; 41+ messages in thread From: David Chinner @ 2007-05-30 4:44 UTC (permalink / raw) To: David Chinner; +Cc: Luck, Tony, Andrew Morton, lkml, linux-ia64 On Wed, May 30, 2007 at 01:30:41PM +1000, David Chinner wrote: > On Wed, May 23, 2007 at 10:44:16AM -0700, Luck, Tony wrote: > > > > Saw this when running strace -f on a script on 2.6.21 on ia64: > > > > > > > > BUG: sleeping function called from invalid context at kernel/fork.c:385 > > > > in_atomic():1, irqs_disabled():0 > > ... snip ... > > > > I could reproduce it via 'strace -f sleep 1' > > > > > > > > > > I'd say this is specific to ia64. Someone would have spotted it on > > > x86 by now. > > > > I tried the "strace -f sleep 1" on 2.6.22-rc2, and I didn't see this "BUG" > > there. Can you try your other test cases on the latest kernel. If it has > > already been fixed we can see about identifying the patch for possible backport > > to 2.6.21.stable > > Sorry for taking so long to get back to this - I still see this in > 2.6.22-rc2. Hmmm - I wonder if my tree is screwed up in some weird way. I'm seeing link warnings as well: AS .tmp_kallsyms2.o LD vmlinux SYSMAP System.map SYSMAP .tmp_System.map MODPOST vmlinux WARNING: init/built-in.o - Section mismatch: reference to .init.data: from .sdata after 'root_mountflags' (at offset 0x38) WARNING: init/built-in.o - Section mismatch: reference to .init.data:ino from .sdata after 'root_mountflags' (at offset 0x40) WARNING: arch/ia64/kernel/built-in.o - Section mismatch: reference to .init.data:smp_boot_data from .sdata before 'acpi_irq_model' (at offset -0x0) WARNING: arch/ia64/kernel/built-in.o - Section mismatch: reference to .init.data:rsvd_region from .sdata between 'ia64_sal' (at offset 0x118) and 'ia64_i_cache_stride_shift' WARNING: arch/ia64/kernel/built-in.o - Section mismatch: reference to .init.data:smp_boot_data from .sdata between 'cpu.25267' (at offset0x2e8) and 'sal_state_for_booting_cpu' WARNING: arch/ia64/mm/built-in.o - Section mismatch: reference to .init.data: from .sdata between 'hpage_shift' (at offset 0x50) and 'first_time.25897' WARNING: arch/ia64/mm/built-in.o - Section mismatch: reference to .init.data: from .sdata between 'hpage_shift' (at offset 0x68) and 'first_time.25897' WARNING: arch/ia64/mm/built-in.o - Section mismatch: reference to .init.data: from .sdata between 'hpage_shift' (at offset 0x70) and 'first_time.25897' WARNING: arch/ia64/mm/built-in.o - Section mismatch: reference to .init.data: from .sdata between 'hpage_shift' (at offset 0x88) and 'first_time.25897' WARNING: arch/ia64/mm/built-in.o - Section mismatch: reference to .init.data: from .sdata between 'hpage_shift' (at offset 0x90) and 'first_time.25897' ..... There's more errors, but they are all section mismatch warnings. I tried a make mrproper to see if that would fix but it didn't.... Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group ^ permalink raw reply [flat|nested] 41+ messages in thread
* RE: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-30 4:44 ` David Chinner @ 2007-05-30 20:11 ` Luck, Tony 2007-05-30 22:39 ` Christoph Lameter 2007-05-31 0:53 ` David Chinner 0 siblings, 2 replies; 41+ messages in thread From: Luck, Tony @ 2007-05-30 20:11 UTC (permalink / raw) To: David Chinner; +Cc: Andrew Morton, lkml, linux-ia64 > Hmmm - I wonder if my tree is screwed up in some weird way. I'm seeing link > warnings as well: > > WARNING: init/built-in.o - Section mismatch: reference to .init.data: from .sdata after 'root_mountflags' (at offset 0x38) I thought that I'd got the section mis-match warnings down to just one (and that was in ACPI code, so I sent a patch to Len for it). Are you building from defconfig, or one of the standard ones? Changing config options always has the possibility of unearthing new spots where there are conflicts between __init, __cpuinit and __devinit. But I've had other complaints that these Section mismatch warnings are still showing up in kernels built from the "standard" config files (arch/ia64/configs/*) ... which I'm not seeing. So I'm more than a little confused about this. These errors are unlikely to be related to the strace bug that you've reported. I'll try to pound on this some more when I'm back on the same continent as my test machines. -Tony ^ permalink raw reply [flat|nested] 41+ messages in thread
* RE: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-30 20:11 ` Luck, Tony @ 2007-05-30 22:39 ` Christoph Lameter 2007-05-30 23:19 ` Luck, Tony 2007-05-31 0:53 ` David Chinner 1 sibling, 1 reply; 41+ messages in thread From: Christoph Lameter @ 2007-05-30 22:39 UTC (permalink / raw) To: Luck, Tony; +Cc: David Chinner, Andrew Morton, lkml, linux-ia64 On Wed, 30 May 2007, Luck, Tony wrote: > > WARNING: init/built-in.o - Section mismatch: reference to .init.data: from .sdata after 'root_mountflags' (at offset 0x38) > > I thought that I'd got the section mis-match warnings down to > just one (and that was in ACPI code, so I sent a patch to Len > for it). Hmmm... My compilation of 2.6.21-rc2-mm1 just aborted with: (used sn2_defconfig). LD .tmp_vmlinux1 `.exit.text' referenced in section `.init.text' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o make[2]: *** [.tmp_vmlinux1] Error 1 make[1]: *** [targz-pkg] Error 2 make: *** [targz-pkg] Error 2 ^ permalink raw reply [flat|nested] 41+ messages in thread
* RE: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-30 22:39 ` Christoph Lameter @ 2007-05-30 23:19 ` Luck, Tony 2007-05-30 23:31 ` Christoph Lameter 0 siblings, 1 reply; 41+ messages in thread From: Luck, Tony @ 2007-05-30 23:19 UTC (permalink / raw) To: Christoph Lameter Cc: David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg > `.exit.text' referenced in section `.init.text' of drivers/built-in.o: > defined in discarded section `.exit.text' of drivers/built-in.o This one is a fatal error ... the code is trying to call a function that has been marked __exit in a driver that has been built-in, instead of as a module. Since a builtin driver can never be unloaded, the kernel has thrown away all the __exit routines (at link time). The error message appears less than helpful in tracking down which routine in which driver is the problem though. -Tony ^ permalink raw reply [flat|nested] 41+ messages in thread
* RE: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-30 23:19 ` Luck, Tony @ 2007-05-30 23:31 ` Christoph Lameter 2007-05-30 23:34 ` Randy Dunlap 2007-05-31 4:43 ` Sam Ravnborg 0 siblings, 2 replies; 41+ messages in thread From: Christoph Lameter @ 2007-05-30 23:31 UTC (permalink / raw) To: Luck, Tony; +Cc: David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg On Wed, 30 May 2007, Luck, Tony wrote: > > > `.exit.text' referenced in section `.init.text' of drivers/built-in.o: > > defined in discarded section `.exit.text' of drivers/built-in.o > > > This one is a fatal error ... the code is trying to call a function > that has been marked __exit in a driver that has been built-in, instead > of as a module. Since a builtin driver can never be unloaded, the kernel > has thrown away all the __exit routines (at link time). > > The error message appears less than helpful in tracking down which > routine in which driver is the problem though. Right. I have no idea where to look. The function has no name? Or is the segment .exit.text referenced by namne in .init.text? ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-30 23:31 ` Christoph Lameter @ 2007-05-30 23:34 ` Randy Dunlap 2007-05-30 23:53 ` Christoph Lameter 2007-05-31 4:43 ` Sam Ravnborg 1 sibling, 1 reply; 41+ messages in thread From: Randy Dunlap @ 2007-05-30 23:34 UTC (permalink / raw) To: Christoph Lameter Cc: Luck, Tony, David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg On Wed, 30 May 2007 16:31:35 -0700 (PDT) Christoph Lameter wrote: > On Wed, 30 May 2007, Luck, Tony wrote: > > > > > > `.exit.text' referenced in section `.init.text' of drivers/built-in.o: > > > defined in discarded section `.exit.text' of drivers/built-in.o > > > > > > This one is a fatal error ... the code is trying to call a function > > that has been marked __exit in a driver that has been built-in, instead > > of as a module. Since a builtin driver can never be unloaded, the kernel > > has thrown away all the __exit routines (at link time). > > > > The error message appears less than helpful in tracking down which > > routine in which driver is the problem though. > > Right. I have no idea where to look. The function has no name? Or is the > segment .exit.text referenced by namne in .init.text? Maybe 'objdump drivers/built-in.o and then grep that output (file) for /exit.text/ ... --- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-30 23:34 ` Randy Dunlap @ 2007-05-30 23:53 ` Christoph Lameter 2007-05-30 23:55 ` Randy Dunlap 0 siblings, 1 reply; 41+ messages in thread From: Christoph Lameter @ 2007-05-30 23:53 UTC (permalink / raw) To: Randy Dunlap Cc: Luck, Tony, David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg On Wed, 30 May 2007, Randy Dunlap wrote: > > Right. I have no idea where to look. The function has no name? Or is the > > segment .exit.text referenced by namne in .init.text? > > Maybe 'objdump drivers/built-in.o and then grep that output (file) > for /exit.text/ ... clameter@schroedinger:~/software/slub$ objdump -t drivers/built-in.o |grep "exit.text" 0000000000000000 l d .exit.text 0000000000000000 .exit.text 0000000000000000 l d *ABS* 0000000000000000 .rela.exit.text 0000000000000000 l d .IA_64.unwind_info.exit.text 0000000000000000 .IA_64.unwind_info.exit.text 0000000000000000 l d .IA_64.unwind.exit.text 0000000000000000 .IA_64.unwind.exit.text 0000000000000000 l d *ABS* 0000000000000000 .rela.IA_64.unwind.exit.text 0000000000000000 l F .exit.text 0000000000000050 pcie_portdrv_exit 0000000000000060 l F .exit.text 0000000000000040 aer_service_exit 00000000000000a0 l F .exit.text 0000000000000040 pci_hotplug_exit 00000000000000e0 l F .exit.text 00000000000000b0 pcied_cleanup 00000000000001a0 l F .exit.text 0000000000000160 mspec_exit 0000000000000300 l F .exit.text 0000000000000010 efi_rtc_exit 0000000000000320 l F .exit.text 0000000000000010 agp_exit 0000000000000340 l F .exit.text 00000000000000a0 sn_sal_module_exit 00000000000003e0 l F .exit.text 0000000000000040 firmware_class_exit 0000000000000420 l F .exit.text 0000000000000110 rd_cleanup 0000000000000540 l F .exit.text 00000000000001d0 loop_exit 0000000000000720 l F .exit.text 0000000000000040 tg3_cleanup 0000000000000760 l F .exit.text 0000000000000040 idedisk_exit 00000000000007a0 l F .exit.text 0000000000000040 ide_cdrom_exit 00000000000007e0 l F .exit.text 00000000000000a0 exit_scsi 0000000000000880 l F .exit.text 0000000000000080 spi_transport_exit 0000000000000900 l F .exit.text 00000000000000a0 fc_transport_exit 00000000000009a0 l F .exit.text 00000000000000e0 sas_transport_exit 0000000000000a80 l F .exit.text 0000000000000040 sas_class_exit 0000000000000ac0 l F .exit.text 0000000000000040 qla1280_exit 0000000000000b00 l F .exit.text 0000000000000140 qla2x00_module_exit 0000000000000c40 l F .exit.text 00000000000000a0 exit_sd 0000000000000ce0 l F .exit.text 0000000000000060 ata_exit 0000000000000d40 l F .exit.text 0000000000000040 vsc_sata_exit 0000000000000d80 l F .exit.text 00000000000000d0 fusion_exit 0000000000000e60 l F .exit.text 00000000000000e0 mptspi_exit 0000000000000f40 l F .exit.text 00000000000000d0 mptfc_exit 0000000000001020 l F .exit.text 00000000000000f0 mptsas_exit 0000000000001120 l F .exit.text 0000000000000060 cdrom_exit 0000000000001180 l F .exit.text 0000000000000080 input_exit 0000000000001200 l F .exit.text 0000000000000070 mousedev_exit 0000000000001280 l F .exit.text 0000000000000040 multipath_exit 00000000000012c0 l F .exit.text 0000000000000240 md_exit 0000000000001500 l F .exit.text 0000000000000090 dm_exit 00000000000015a0 l F .exit.text 0000000000000170 efivars_exit 0000000000001720 l F .exit.text 0000000000000010 hid_exit ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-30 23:53 ` Christoph Lameter @ 2007-05-30 23:55 ` Randy Dunlap 2007-05-31 0:09 ` Christoph Lameter 0 siblings, 1 reply; 41+ messages in thread From: Randy Dunlap @ 2007-05-30 23:55 UTC (permalink / raw) To: Christoph Lameter Cc: Luck, Tony, David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg Christoph Lameter wrote: > On Wed, 30 May 2007, Randy Dunlap wrote: > >>> Right. I have no idea where to look. The function has no name? Or is the >>> segment .exit.text referenced by namne in .init.text? >> Maybe 'objdump drivers/built-in.o and then grep that output (file) >> for /exit.text/ ... OK. I would write the file to disk and view it with an editor. Then at each occurrence of /exit.text/, see if it's inside an __init function... > clameter@schroedinger:~/software/slub$ objdump -t drivers/built-in.o |grep "exit.text" > 0000000000000000 l d .exit.text 0000000000000000 .exit.text > 0000000000000000 l d *ABS* 0000000000000000 .rela.exit.text > 0000000000000000 l d .IA_64.unwind_info.exit.text 0000000000000000 .IA_64.unwind_info.exit.text > 0000000000000000 l d .IA_64.unwind.exit.text 0000000000000000 .IA_64.unwind.exit.text > 0000000000000000 l d *ABS* 0000000000000000 .rela.IA_64.unwind.exit.text > 0000000000000000 l F .exit.text 0000000000000050 pcie_portdrv_exit > 0000000000000060 l F .exit.text 0000000000000040 aer_service_exit > 00000000000000a0 l F .exit.text 0000000000000040 pci_hotplug_exit > 00000000000000e0 l F .exit.text 00000000000000b0 pcied_cleanup > 00000000000001a0 l F .exit.text 0000000000000160 mspec_exit > 0000000000000300 l F .exit.text 0000000000000010 efi_rtc_exit > 0000000000000320 l F .exit.text 0000000000000010 agp_exit > 0000000000000340 l F .exit.text 00000000000000a0 sn_sal_module_exit > 00000000000003e0 l F .exit.text 0000000000000040 firmware_class_exit > 0000000000000420 l F .exit.text 0000000000000110 rd_cleanup > 0000000000000540 l F .exit.text 00000000000001d0 loop_exit > 0000000000000720 l F .exit.text 0000000000000040 tg3_cleanup > 0000000000000760 l F .exit.text 0000000000000040 idedisk_exit > 00000000000007a0 l F .exit.text 0000000000000040 ide_cdrom_exit > 00000000000007e0 l F .exit.text 00000000000000a0 exit_scsi > 0000000000000880 l F .exit.text 0000000000000080 spi_transport_exit > 0000000000000900 l F .exit.text 00000000000000a0 fc_transport_exit > 00000000000009a0 l F .exit.text 00000000000000e0 sas_transport_exit > 0000000000000a80 l F .exit.text 0000000000000040 sas_class_exit > 0000000000000ac0 l F .exit.text 0000000000000040 qla1280_exit > 0000000000000b00 l F .exit.text 0000000000000140 qla2x00_module_exit > 0000000000000c40 l F .exit.text 00000000000000a0 exit_sd > 0000000000000ce0 l F .exit.text 0000000000000060 ata_exit > 0000000000000d40 l F .exit.text 0000000000000040 vsc_sata_exit > 0000000000000d80 l F .exit.text 00000000000000d0 fusion_exit > 0000000000000e60 l F .exit.text 00000000000000e0 mptspi_exit > 0000000000000f40 l F .exit.text 00000000000000d0 mptfc_exit > 0000000000001020 l F .exit.text 00000000000000f0 mptsas_exit > 0000000000001120 l F .exit.text 0000000000000060 cdrom_exit > 0000000000001180 l F .exit.text 0000000000000080 input_exit > 0000000000001200 l F .exit.text 0000000000000070 mousedev_exit > 0000000000001280 l F .exit.text 0000000000000040 multipath_exit > 00000000000012c0 l F .exit.text 0000000000000240 md_exit > 0000000000001500 l F .exit.text 0000000000000090 dm_exit > 00000000000015a0 l F .exit.text 0000000000000170 efivars_exit > 0000000000001720 l F .exit.text 0000000000000010 hid_exit > -- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-30 23:55 ` Randy Dunlap @ 2007-05-31 0:09 ` Christoph Lameter 2007-05-31 2:37 ` Luck, Tony 2007-05-31 6:12 ` BUG: sleeping function called from invalid context at kernel/fork.c:385 Randy Dunlap 0 siblings, 2 replies; 41+ messages in thread From: Christoph Lameter @ 2007-05-31 0:09 UTC (permalink / raw) To: Randy Dunlap Cc: Luck, Tony, David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg On Wed, 30 May 2007, Randy Dunlap wrote: > OK. I would write the file to disk and view it with an editor. > Then at each occurrence of /exit.text/, see if it's inside an __init > function... Ahh okay. cscope will do that too.... But all have __exit. ^ permalink raw reply [flat|nested] 41+ messages in thread
* RE: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-31 0:09 ` Christoph Lameter @ 2007-05-31 2:37 ` Luck, Tony 2007-05-31 3:19 ` Christoph Lameter 2007-05-31 6:12 ` BUG: sleeping function called from invalid context at kernel/fork.c:385 Randy Dunlap 1 sibling, 1 reply; 41+ messages in thread From: Luck, Tony @ 2007-05-31 2:37 UTC (permalink / raw) To: Christoph Lameter, Randy Dunlap Cc: David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg > Ahh okay. cscope will do that too.... But all have __exit. The trick is that one of them *shouldn't* have __exit. With cscope you'll have to use the "Find functions calling this function:" mode to try and find the __init function that is calling an __exit function. -Tony ^ permalink raw reply [flat|nested] 41+ messages in thread
* RE: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-31 2:37 ` Luck, Tony @ 2007-05-31 3:19 ` Christoph Lameter 2007-05-31 15:20 ` Prarit Bhargava 0 siblings, 1 reply; 41+ messages in thread From: Christoph Lameter @ 2007-05-31 3:19 UTC (permalink / raw) To: Luck, Tony Cc: Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg On Wed, 30 May 2007, Luck, Tony wrote: > > Ahh okay. cscope will do that too.... But all have __exit. > > The trick is that one of them *shouldn't* have __exit. With cscope > you'll have to use the "Find functions calling this function:" > mode to try and find the __init function that is calling an > __exit function. Urgh... Does it have to be that difficult? ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-31 3:19 ` Christoph Lameter @ 2007-05-31 15:20 ` Prarit Bhargava 2007-05-31 19:54 ` Sam Ravnborg ` (3 more replies) 0 siblings, 4 replies; 41+ messages in thread From: Prarit Bhargava @ 2007-05-31 15:20 UTC (permalink / raw) To: Christoph Lameter Cc: Luck, Tony, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg [-- Attachment #1: Type: text/plain, Size: 3339 bytes --] Christoph Lameter wrote: > On Wed, 30 May 2007, Luck, Tony wrote: > > >>> Ahh okay. cscope will do that too.... But all have __exit. >>> >> The trick is that one of them *shouldn't* have __exit. With cscope >> you'll have to use the "Find functions calling this function:" >> mode to try and find the __init function that is calling an >> __exit function. >> > > Urgh... Does it have to be that difficult? > - > Sometimes yes ... but in this case no. I flipped config options on and off until I tracked the problem down into the loopback driver, and then manually ran modpost on drivers/block/built-in.o to reveal: ....Nothing. Something is borken in modpost because I found a bug in the loopback code which is a _REAL_ bug. The -mm tree contains a patch which calls __exit loop_exit from __init loop_init . (I'll submit this patch directly to Andrew in about 5 mins. I'm including the patch here just so Christoph can grab it and continue on.) Christoph, this is one less beer I owe you :) :) :) Tony, the ia64 section mismatch "whack-a-mole" is far from over :( WARNING: init/built-in.o(.sdata+0x48): Section mismatch: reference to .init.data: (after 'C.261.15930') WARNING: init/built-in.o(.sdata+0x50): Section mismatch: reference to .init.data: (after 'C.261.15930') WARNING: init/built-in.o(.sdata+0x58): Section mismatch: reference to .init.data:ino (after 'C.261.15930') WARNING: arch/ia64/kernel/built-in.o(.sdata+0x0): Section mismatch: reference to .init.data:smp_boot_data before 'acpi_irq_model' (at offset -0x0) WARNING: arch/ia64/kernel/built-in.o(.sdata+0x98): Section mismatch: reference to .init.data:rsvd_region (between 'ia64_sal' and 'ia64_i_cache_stride_shift') WARNING: arch/ia64/kernel/built-in.o(.sdata+0xa0): Section mismatch: reference to .init.data:rsvd_region (between 'ia64_sal' and 'ia64_i_cache_stride_shift') WARNING: arch/ia64/kernel/built-in.o(.sdata+0x228): Section mismatch: reference to .init.data:smp_boot_data (between 'cpu.25776' and 'smp_num_siblings') WARNING: arch/ia64/mm/built-in.o(.sdata+0x60): Section mismatch: reference to .init.data: (between 'hpage_shift' and 'first_time.26434') WARNING: arch/ia64/mm/built-in.o(.sdata+0x68): Section mismatch: reference to .init.data: (between 'hpage_shift' and 'first_time.26434') WARNING: mm/built-in.o(.sdata+0x0): Section mismatch: reference to .init.data:early_node_map before 'sysctl_lowmem_reserve_ratio' (at offset -0x0) WARNING: mm/built-in.o(.sdata+0x8): Section mismatch: reference to .init.data:early_node_map before 'sysctl_lowmem_reserve_ratio' (at offset -0x0) WARNING: mm/built-in.o(.sdata+0x10): Section mismatch: reference to .init.data:early_node_map before 'sysctl_lowmem_reserve_ratio' (at offset -0x0) WARNING: mm/built-in.o(.sdata+0x238): Section mismatch: reference to .init.data: (between 'htlb_alloc_mask' and 'slab_early_init') WARNING: mm/built-in.o(.sdata+0x240): Section mismatch: reference to .init.data:initkmem_list3 (between 'htlb_alloc_mask' and 'slab_early_init') WARNING: mm/built-in.o(.sdata+0x248): Section mismatch: reference to .init.data:initkmem_list3 (between 'htlb_alloc_mask' and 'slab_early_init') WARNING: drivers/built-in.o(.sdata+0x8b0): Section mismatch: reference to .init.data: (between 'scsi_null_device_strs' and 'fc_dev_loss_tmo') P. [-- Attachment #2: diff --] [-- Type: text/plain, Size: 346 bytes --] --- linux/drivers/block/loop.c.orig 2007-05-31 11:15:21.000000000 -0400 +++ linux/drivers/block/loop.c 2007-05-31 11:11:05.000000000 -0400 @@ -1456,7 +1456,7 @@ static struct kobject *loop_probe(dev_t return kobj; } -static void __exit loop_exit(void) +static void loop_exit(void) { unsigned long range; struct loop_device *lo, *next; ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-31 15:20 ` Prarit Bhargava @ 2007-05-31 19:54 ` Sam Ravnborg 2007-05-31 20:04 ` Sam Ravnborg ` (2 subsequent siblings) 3 siblings, 0 replies; 41+ messages in thread From: Sam Ravnborg @ 2007-05-31 19:54 UTC (permalink / raw) To: Prarit Bhargava Cc: Christoph Lameter, Luck, Tony, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64 On Thu, May 31, 2007 at 11:20:27AM -0400, Prarit Bhargava wrote: > > > Christoph Lameter wrote: > >On Wed, 30 May 2007, Luck, Tony wrote: > > > > > >>>Ahh okay. cscope will do that too.... But all have __exit. > >>> > >>The trick is that one of them *shouldn't* have __exit. With cscope > >>you'll have to use the "Find functions calling this function:" > >>mode to try and find the __init function that is calling an > >>__exit function. > >> > > > >Urgh... Does it have to be that difficult? > >- > > > > > Sometimes yes ... but in this case no. > > I flipped config options on and off until I tracked the problem down > into the loopback driver, and then manually ran modpost on > drivers/block/built-in.o to reveal: > > ....Nothing. > > Something is borken in modpost because I found a bug in the loopback > code which is a _REAL_ bug. In the initial version of the section mismatch check code I ignored references to .exit.text from .init.text code. Today I do not see why this should be allowed. So unless an allmodconfig build for i386 + maybe a few more archs does not show any significant regressions I will enable this check. My initial i386 allmodconfig build pointed out a number of places where this happened (I lost the warnings and are doing a rebuild now)A . One such place is microcode.c where we has static int __init microcode_init (void) { ... if (IS_ERR(microcode_pdev)) { microcode_dev_exit(); return PTR_ERR(microcode_pdev); } And: static void __exit microcode_dev_exit (void) { misc_deregister(µcode_dev); } I assume this is a real bug that we have not triggered during testing becasue this is in an error-path. The linker will not error out because .exit.text are discarded at run-time at least for i386. Sam ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-31 15:20 ` Prarit Bhargava 2007-05-31 19:54 ` Sam Ravnborg @ 2007-05-31 20:04 ` Sam Ravnborg 2007-05-31 20:08 ` [PATCH] net/hp100: fix section mismatch warning Sam Ravnborg ` (4 more replies) 2007-05-31 20:42 ` BUG: sleeping function called from invalid context at kernel/fork.c:385 Christoph Lameter 2007-06-01 3:18 ` Luck, Tony 3 siblings, 5 replies; 41+ messages in thread From: Sam Ravnborg @ 2007-05-31 20:04 UTC (permalink / raw) To: Prarit Bhargava Cc: Christoph Lameter, Luck, Tony, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64, sam On Thu, May 31, 2007 at 11:20:27AM -0400, Prarit Bhargava wrote: > > Something is borken in modpost because I found a bug in the loopback > code which is a _REAL_ bug. Here is the result for an i386 allmodconfig build: WARNING: arch/i386/kernel/built-in.o(.init.text+0x3966): Section mismatch: reference to .exit.text: (between 'microcode_init' and 'parse_maxcpus') WARNING: arch/i386/kernel/built-in.o(.init.text+0x3992): Section mismatch: reference to .exit.text: (between 'microcode_init' and 'parse_maxcpus') Building modules, stage 2. Kernel: arch/i386/boot/bzImage is ready (#4) MODPOST 2100 modules WARNING: drivers/acpi/asus_acpi.o(.init.text+0xb7): Section mismatch: reference to .exit.text: (after 'init_module') WARNING: drivers/acpi/toshiba_acpi.o(.init.text+0x13a): Section mismatch: reference to .exit.text: (after 'init_module') WARNING: drivers/block/loop.o(.init.text+0x6b): Section mismatch: reference to .exit.text: (after 'init_module') WARNING: drivers/isdn/hardware/eicon/divadidd.o(.init.text+0xc4): Section mismatch: reference to .exit.text: (between 'init_module' and 'diddfunc_init') WARNING: drivers/isdn/hardware/eicon/divas.o(.init.text+0xf4): Section mismatch: reference to .exit.text:divasfunc_exit (between 'init_module' and 'divasfunc_init') WARNING: drivers/isdn/hardware/eicon/divas.o(.init.text+0x10d): Section mismatch: reference to .exit.text:divasfunc_exit (between 'init_module' and 'divasfunc_init') WARNING: drivers/isdn/hardware/eicon/divas.o(.init.text+0x148): Section mismatch: reference to .exit.text:divasfunc_exit (between 'init_module' and 'divasfunc_init') WARNING: drivers/kvm/kvm-intel.o(.init.text+0xbd): Section mismatch: reference to .exit.text: (between 'hardware_setup' and 'vmx_disabled_by_bios') WARNING: drivers/net/hp100.o(.init.text+0x26a): Section mismatch: reference to .exit.text: (after 'init_module') Sam ^ permalink raw reply [flat|nested] 41+ messages in thread
* [PATCH] net/hp100: fix section mismatch warning 2007-05-31 20:04 ` Sam Ravnborg @ 2007-05-31 20:08 ` Sam Ravnborg 2007-05-31 20:17 ` [PATCH] kvm: fix section mismatch warning in kvm-intel.o Sam Ravnborg ` (3 subsequent siblings) 4 siblings, 0 replies; 41+ messages in thread From: Sam Ravnborg @ 2007-05-31 20:08 UTC (permalink / raw) To: Prarit Bhargava, netdev Cc: Christoph Lameter, Luck, Tony, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64 Fix following section mismatch warning in hp100: WARNING: drivers/net/hp100.o(.init.text+0x26a): Section mismatch: reference to .exit.text: (after 'init_module') The warning says that we use a function marked __exit from a function marked __init. This is not good on architectures where we discard __exit section for drivers that are built-in. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> --- Comple tested only. Note: This warning does not appear with modpost in upstream kernel but I would like to submit patches for the obvious bugs ASAP Sam diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c index 8118a67..8caa591 100644 --- a/drivers/net/hp100.c +++ b/drivers/net/hp100.c @@ -3005,7 +3005,7 @@ static int __init hp100_isa_init(void) return cards > 0 ? 0 : -ENODEV; } -static void __exit hp100_isa_cleanup(void) +static void hp100_isa_cleanup(void) { int i; ^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH] kvm: fix section mismatch warning in kvm-intel.o 2007-05-31 20:04 ` Sam Ravnborg 2007-05-31 20:08 ` [PATCH] net/hp100: fix section mismatch warning Sam Ravnborg @ 2007-05-31 20:17 ` Sam Ravnborg 2007-05-31 20:24 ` [PATCH] acpi: fix section mismatch warning in asus_acpi.o Sam Ravnborg ` (2 subsequent siblings) 4 siblings, 0 replies; 41+ messages in thread From: Sam Ravnborg @ 2007-05-31 20:17 UTC (permalink / raw) To: Prarit Bhargava, avi Cc: Christoph Lameter, Luck, Tony, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64 Fix following section mismatch warning in kvm-intel.o: WARNING: o-i386/drivers/kvm/kvm-intel.o(.init.text+0xbd): Section mismatch: reference to .exit.text: (between 'hardware_setup' and 'vmx_disabled_by_bios') The function free_kvm_area is used in the function alloc_kvm_area which is marked __init. The __exit area is discarded by some archs during link-time if a module is built-in resulting in an oops. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> --- Note: This warning is only seen by my local copy of modpost but the change will soon hit upstream. Sam diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index e6e4d24..184238e 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -639,7 +639,7 @@ static void free_vmcs(struct vmcs *vmcs) free_pages((unsigned long)vmcs, vmcs_descriptor.order); } -static __exit void free_kvm_area(void) +static void free_kvm_area(void) { int cpu; ^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH] acpi: fix section mismatch warning in asus_acpi.o 2007-05-31 20:04 ` Sam Ravnborg 2007-05-31 20:08 ` [PATCH] net/hp100: fix section mismatch warning Sam Ravnborg 2007-05-31 20:17 ` [PATCH] kvm: fix section mismatch warning in kvm-intel.o Sam Ravnborg @ 2007-05-31 20:24 ` Sam Ravnborg 2007-05-31 20:29 ` [PATCH] acpi: fix section mismatch warning in asus + toshiba Sam Ravnborg 2007-05-31 20:46 ` [PATCH] isdn: fix section mismatch warnings Sam Ravnborg 2007-05-31 20:51 ` [PATCH] microcode: fix section mismatch warning Sam Ravnborg 4 siblings, 1 reply; 41+ messages in thread From: Sam Ravnborg @ 2007-05-31 20:24 UTC (permalink / raw) To: Prarit Bhargava, len.brown Cc: Christoph Lameter, Luck, Tony, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64 Fix following section mismatch warning in asus_acpi.o: WARNING: drivers/acpi/asus_acpi.o(.init.text+0xb7): Section mismatch: reference to .exit.text: (after 'init_module') The exit function is used in the init function during an error codition. As __exit may be discarded during link-time / run-time this is no good. Do not mark the exit function __exit. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> --- Note: This warning is only generated by a local copy of modpost but it will soon hit upstream. Sam diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c index b770dea..6d7d415 100644 --- a/drivers/acpi/asus_acpi.c +++ b/drivers/acpi/asus_acpi.c @@ -1357,7 +1357,7 @@ static struct backlight_ops asus_backlight_data = { .update_status = set_brightness_status, }; -static void __exit asus_acpi_exit(void) +static void asus_acpi_exit(void) { if (asus_backlight_device) backlight_device_unregister(asus_backlight_device); ^ permalink raw reply related [flat|nested] 41+ messages in thread
* Re: [PATCH] acpi: fix section mismatch warning in asus + toshiba 2007-05-31 20:24 ` [PATCH] acpi: fix section mismatch warning in asus_acpi.o Sam Ravnborg @ 2007-05-31 20:29 ` Sam Ravnborg 0 siblings, 0 replies; 41+ messages in thread From: Sam Ravnborg @ 2007-05-31 20:29 UTC (permalink / raw) To: Prarit Bhargava, len.brown Cc: Christoph Lameter, Luck, Tony, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64 Fix following section mismatch warnings in acpi WARNING: drivers/acpi/asus_acpi.o(.init.text+0xb7): Section mismatch: reference to .exit.text: (after 'init_module') WARNING: o-i386/drivers/acpi/toshiba_acpi.o(.init.text+0x13a): Section mismatch: reference to .exit.text: (after 'init_module') The exit function is used in the init function during an error codition. As __exit may be discarded during link-time / run-time this is no good. Do not mark the exit function __exit. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> --- Updated patch that covers both drivers. Sam diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c index b770dea..6d7d415 100644 --- a/drivers/acpi/asus_acpi.c +++ b/drivers/acpi/asus_acpi.c @@ -1357,7 +1357,7 @@ static struct backlight_ops asus_backlight_data = { .update_status = set_brightness_status, }; -static void __exit asus_acpi_exit(void) +static void asus_acpi_exit(void) { if (asus_backlight_device) backlight_device_unregister(asus_backlight_device); diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c index 3906d47..1cfbecb 100644 --- a/drivers/acpi/toshiba_acpi.c +++ b/drivers/acpi/toshiba_acpi.c @@ -538,7 +538,7 @@ static struct backlight_ops toshiba_backlight_data = { .update_status = set_lcd_status, }; -static void __exit toshiba_acpi_exit(void) +static void toshiba_acpi_exit(void) { if (toshiba_backlight_device) backlight_device_unregister(toshiba_backlight_device); ^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH] isdn: fix section mismatch warnings 2007-05-31 20:04 ` Sam Ravnborg ` (2 preceding siblings ...) 2007-05-31 20:24 ` [PATCH] acpi: fix section mismatch warning in asus_acpi.o Sam Ravnborg @ 2007-05-31 20:46 ` Sam Ravnborg 2007-05-31 20:51 ` [PATCH] microcode: fix section mismatch warning Sam Ravnborg 4 siblings, 0 replies; 41+ messages in thread From: Sam Ravnborg @ 2007-05-31 20:46 UTC (permalink / raw) To: Prarit Bhargava, isdn4linux, kkeil Cc: Christoph Lameter, Luck, Tony, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64 Fix the following section mismatch warnings: WARNING: drivers/isdn/hardware/eicon/divadidd.o(.init.text+0xc4): Section mismatch: reference to .exit.text: (between 'init_module' and 'diddfunc_init') WARNING: drivers/isdn/hardware/eicon/divas.o(.init.text+0xf4): Section mismatch: reference to .exit.text:divasfunc_exit (between 'init_module' and 'divasfunc_init') WARNING: drivers/isdn/hardware/eicon/divas.o(.init.text+0x10d): Section mismatch: reference to .exit.text:divasfunc_exit (between 'init_module' and 'divasfunc_init') WARNING: drivers/isdn/hardware/eicon/divas.o(.init.text+0x148): Section mismatch: reference to .exit.text:divasfunc_exit (between 'init_module' and 'divasfunc_init') They all point to situation whare a function marked __init calls a function marked __exit - but the __exit section may have been discarded. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> --- Note: This warning is generated by a modified copy of modpost in my tree. It will soon hit upstearm. Sam diff --git a/drivers/isdn/hardware/eicon/diva_didd.c b/drivers/isdn/hardware/eicon/diva_didd.c index 14298b8..d755d90 100644 --- a/drivers/isdn/hardware/eicon/diva_didd.c +++ b/drivers/isdn/hardware/eicon/diva_didd.c @@ -99,7 +99,7 @@ static int DIVA_INIT_FUNCTION create_proc(void) return (0); } -static void DIVA_EXIT_FUNCTION remove_proc(void) +static void remove_proc(void) { remove_proc_entry(DRIVERLNAME, proc_net_eicon); remove_proc_entry("net/eicon", NULL); diff --git a/drivers/isdn/hardware/eicon/divasfunc.c b/drivers/isdn/hardware/eicon/divasfunc.c index df61e51..46fc21a 100644 --- a/drivers/isdn/hardware/eicon/divasfunc.c +++ b/drivers/isdn/hardware/eicon/divasfunc.c @@ -231,7 +231,7 @@ int DIVA_INIT_FUNCTION divasfunc_init(int dbgmask) /* * exit */ -void DIVA_EXIT_FUNCTION divasfunc_exit(void) +void divasfunc_exit(void) { divasa_xdi_driver_unload(); disconnect_didd(); ^ permalink raw reply related [flat|nested] 41+ messages in thread
* [PATCH] microcode: fix section mismatch warning 2007-05-31 20:04 ` Sam Ravnborg ` (3 preceding siblings ...) 2007-05-31 20:46 ` [PATCH] isdn: fix section mismatch warnings Sam Ravnborg @ 2007-05-31 20:51 ` Sam Ravnborg 4 siblings, 0 replies; 41+ messages in thread From: Sam Ravnborg @ 2007-05-31 20:51 UTC (permalink / raw) To: Prarit Bhargava, tigran Cc: Christoph Lameter, Luck, Tony, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64 Fix the following section mismatch warnings in microcode.c: WARNING: arch/i386/kernel/built-in.o(.init.text+0x3966): Section mismatch: reference to .exit.text: (between 'microcode_init' and 'parse_maxcpus') WARNING: arch/i386/kernel/built-in.o(.init.text+0x3992): Section mismatch: reference to .exit.text: (between 'microcode_init' and 'parse_maxcpus') The warning are caused by a function marked __init that calls a function marked __exit. Functions marked __exit may be discarded either during link or run-time and thus the reference is not good. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> --- diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c index 83f825f..d865d04 100644 --- a/arch/i386/kernel/microcode.c +++ b/arch/i386/kernel/microcode.c @@ -478,7 +478,7 @@ static int __init microcode_dev_init (void) return 0; } -static void __exit microcode_dev_exit (void) +static void microcode_dev_exit (void) { misc_deregister(µcode_dev); } ^ permalink raw reply related [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-31 15:20 ` Prarit Bhargava 2007-05-31 19:54 ` Sam Ravnborg 2007-05-31 20:04 ` Sam Ravnborg @ 2007-05-31 20:42 ` Christoph Lameter 2007-06-01 3:18 ` Luck, Tony 3 siblings, 0 replies; 41+ messages in thread From: Christoph Lameter @ 2007-05-31 20:42 UTC (permalink / raw) To: Prarit Bhargava Cc: Luck, Tony, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg On Thu, 31 May 2007, Prarit Bhargava wrote: > Christoph, this is one less beer I owe you :) :) :) Finally the compile works. Thanks. ^ permalink raw reply [flat|nested] 41+ messages in thread
* RE: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-31 15:20 ` Prarit Bhargava ` (2 preceding siblings ...) 2007-05-31 20:42 ` BUG: sleeping function called from invalid context at kernel/fork.c:385 Christoph Lameter @ 2007-06-01 3:18 ` Luck, Tony 2007-06-01 3:31 ` Prarit Bhargava 3 siblings, 1 reply; 41+ messages in thread From: Luck, Tony @ 2007-06-01 3:18 UTC (permalink / raw) To: Prarit Bhargava, Christoph Lameter Cc: Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg > Tony, the ia64 section mismatch "whack-a-mole" is far from over :( Can you post the .config file that you are using when you see all those warnings ... I'll start bopping them on their cute little heads. -Tony ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-06-01 3:18 ` Luck, Tony @ 2007-06-01 3:31 ` Prarit Bhargava 2007-06-01 4:05 ` Christoph Lameter 2007-06-01 8:00 ` Luck, Tony 0 siblings, 2 replies; 41+ messages in thread From: Prarit Bhargava @ 2007-06-01 3:31 UTC (permalink / raw) To: Luck, Tony Cc: Christoph Lameter, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg Luck, Tony wrote: >> Tony, the ia64 section mismatch "whack-a-mole" is far from over :( >> > > Can you post the .config file that you are using when you see all those > warnings ... I'll start bopping them on their cute little heads. > > Hi Tony, I used the sn2_defconfig in the tree :) P. > -Tony > ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-06-01 3:31 ` Prarit Bhargava @ 2007-06-01 4:05 ` Christoph Lameter 2007-06-01 4:17 ` Sam Ravnborg 2007-06-01 8:00 ` Luck, Tony 1 sibling, 1 reply; 41+ messages in thread From: Christoph Lameter @ 2007-06-01 4:05 UTC (permalink / raw) To: Prarit Bhargava Cc: Luck, Tony, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg On Thu, 31 May 2007, Prarit Bhargava wrote: > I used the sn2_defconfig in the tree :) That is a static kernel build. Ideal for that kind of bug. ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-06-01 4:05 ` Christoph Lameter @ 2007-06-01 4:17 ` Sam Ravnborg 2007-06-01 4:45 ` Christoph Lameter 0 siblings, 1 reply; 41+ messages in thread From: Sam Ravnborg @ 2007-06-01 4:17 UTC (permalink / raw) To: Christoph Lameter Cc: Prarit Bhargava, Luck, Tony, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64 On Thu, May 31, 2007 at 09:05:54PM -0700, Christoph Lameter wrote: > On Thu, 31 May 2007, Prarit Bhargava wrote: > > > I used the sn2_defconfig in the tree :) > > That is a static kernel build. Ideal for that kind of bug. Quite the opposite. If modpost cannot resolve symbols you are jsut told what top-level file it is in. A allmodconfig should be more useful and give you warnings in all normal cases. Let me know if I shall look over some of the warnings. Sam ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-06-01 4:17 ` Sam Ravnborg @ 2007-06-01 4:45 ` Christoph Lameter 2007-06-01 6:42 ` Sam Ravnborg 0 siblings, 1 reply; 41+ messages in thread From: Christoph Lameter @ 2007-06-01 4:45 UTC (permalink / raw) To: Sam Ravnborg Cc: Prarit Bhargava, Luck, Tony, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64 On Fri, 1 Jun 2007, Sam Ravnborg wrote: > On Thu, May 31, 2007 at 09:05:54PM -0700, Christoph Lameter wrote: > > On Thu, 31 May 2007, Prarit Bhargava wrote: > > > > > I used the sn2_defconfig in the tree :) > > > > That is a static kernel build. Ideal for that kind of bug. > Quite the opposite. I thought that a static kernel build would throw out the __exit sections? So it should trigger the bug? ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-06-01 4:45 ` Christoph Lameter @ 2007-06-01 6:42 ` Sam Ravnborg 0 siblings, 0 replies; 41+ messages in thread From: Sam Ravnborg @ 2007-06-01 6:42 UTC (permalink / raw) To: Christoph Lameter Cc: Prarit Bhargava, Luck, Tony, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64 On Thu, May 31, 2007 at 09:45:31PM -0700, Christoph Lameter wrote: > On Fri, 1 Jun 2007, Sam Ravnborg wrote: > > > On Thu, May 31, 2007 at 09:05:54PM -0700, Christoph Lameter wrote: > > > On Thu, 31 May 2007, Prarit Bhargava wrote: > > > > > > > I used the sn2_defconfig in the tree :) > > > > > > That is a static kernel build. Ideal for that kind of bug. > > Quite the opposite. > > I thought that a static kernel build would throw out the __exit sections? > So it should trigger the bug? Correct. But the other section mismatch warnings that Prarit posted was not related to .exit.text (IIRC). Anyway I will try to do a ia64 build tonight to take a short look at it. If there is something general then I will fix it in modpost. Sam ^ permalink raw reply [flat|nested] 41+ messages in thread
* RE: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-06-01 3:31 ` Prarit Bhargava 2007-06-01 4:05 ` Christoph Lameter @ 2007-06-01 8:00 ` Luck, Tony 2007-06-01 10:30 ` Prarit Bhargava 2007-06-05 14:55 ` linux-ia64 build warning messages Russ Anderson 1 sibling, 2 replies; 41+ messages in thread From: Luck, Tony @ 2007-06-01 8:00 UTC (permalink / raw) To: Prarit Bhargava Cc: Christoph Lameter, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg > I used the sn2_defconfig in the tree :) So there is something odd happening. Russ complained that he was still seeing several errors from the sn2_defconfig build too when I posted the "last fix" to Len. But I don't see them when I build. -Tony ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-06-01 8:00 ` Luck, Tony @ 2007-06-01 10:30 ` Prarit Bhargava 2007-06-01 10:37 ` Luck, Tony 2007-06-05 14:55 ` linux-ia64 build warning messages Russ Anderson 1 sibling, 1 reply; 41+ messages in thread From: Prarit Bhargava @ 2007-06-01 10:30 UTC (permalink / raw) To: Luck, Tony Cc: Christoph Lameter, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg, Vivek Goyal Luck, Tony wrote: >> I used the sn2_defconfig in the tree :) >> > > So there is something odd happening. Russ complained that he > was still seeing several errors from the sn2_defconfig build > too when I posted the "last fix" to Len. But I don't see them > when I build. > > Adding Vivek. I've solved quite a few of the section mismatch errors as well. I'll take a look to see what the problem is. Tony, what system are you using to compile on, OS, etc? P. > -Tony > ^ permalink raw reply [flat|nested] 41+ messages in thread
* RE: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-06-01 10:30 ` Prarit Bhargava @ 2007-06-01 10:37 ` Luck, Tony 0 siblings, 0 replies; 41+ messages in thread From: Luck, Tony @ 2007-06-01 10:37 UTC (permalink / raw) To: Prarit Bhargava Cc: Christoph Lameter, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg, Vivek Goyal > Tony, what system are you using to compile on, OS, etc? $ cat /etc/redhat-release Red Hat Enterprise Linux AS release 4 (Nahant Update 5 Beta) -Tony ^ permalink raw reply [flat|nested] 41+ messages in thread
* linux-ia64 build warning messages 2007-06-01 8:00 ` Luck, Tony 2007-06-01 10:30 ` Prarit Bhargava @ 2007-06-05 14:55 ` Russ Anderson 2007-06-07 5:00 ` Peter Chubb 1 sibling, 1 reply; 41+ messages in thread From: Russ Anderson @ 2007-06-05 14:55 UTC (permalink / raw) To: Luck Tony Cc: Prarit Bhargava, Christoph Lameter, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg Tony Luck wrote: > > > I used the sn2_defconfig in the tree :) > > So there is something odd happening. Russ complained that he > was still seeing several errors from the sn2_defconfig build > too when I posted the "last fix" to Len. But I don't see them > when I build. An additional data point. I have a copy of Tony's test tree pulled down on March 30th that builds without the warning messages. The copy of Tony's test tree pulled down on May 22nd does have warning messages. I'm building both with the same compiler (etc). I'm fairly certain a tree I pulled down in April built without warnings. I've since blown away that tree. The trees were pulled down using cg-clone git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6.git test Building the new tree with an older compiler does not make the warnings go away. Both are built with sn2_defconfig (using all the default options). Using the 3/30 sn2_defconfig with the 5/22 tree (and visa-versa) does not change the warnings. ------------------------------------------------------ MODPOST vmlinux WARNING: init/built-in.o - Section mismatch: reference to .init.data: from .sdata after 'C.260.15660' (at offset 0x48) WARNING: init/built-in.o - Section mismatch: reference to .init.data: from .sdata after 'C.260.15660' (at offset 0x50) WARNING: init/built-in.o - Section mismatch: reference to .init.data:ino from .sdata after 'C.260.15660' (at offset 0x58) WARNING: arch/ia64/kernel/built-in.o - Section mismatch: reference to .init.text:cpu_init from .text between 'start_secondary' (at offset 0x498f2) and 'smp_prepare_boot_cpu' WARNING: arch/ia64/kernel/built-in.o - Section mismatch: reference to .init.text:ia64_mca_cmc_vector_setup from .text between 'start_secondary' (at offset 0x49b02) and 'smp_prepare_boot_cpu' WARNING: arch/ia64/kernel/built-in.o - Section mismatch: reference to .init.data:smp_boot_data from .sdata before 'acpi_irq_model' (at offset -0x0) WARNING: arch/ia64/kernel/built-in.o - Section mismatch: reference to .init.data:rsvd_region from .sdata between 'ia64_sal' (at offset 0x98) and 'ia64_i_cache_stride_shift' WARNING: arch/ia64/kernel/built-in.o - Section mismatch: reference to .init.data:rsvd_region from .sdata between 'ia64_sal' (at offset 0xa0) and 'ia64_i_cache_stride_shift' WARNING: arch/ia64/kernel/built-in.o - Section mismatch: reference to .init.data:smp_boot_data from .sdata between 'cpu.25245' (at offset 0x228) and 'ap_wakeup_vector' WARNING: arch/ia64/mm/built-in.o - Section mismatch: reference to .init.data: from .sdata between 'hpage_shift' (at offset 0x58) and 'first_time.25893' WARNING: arch/ia64/mm/built-in.o - Section mismatch: reference to .init.data: from .sdata between 'hpage_shift' (at offset 0x60) and 'first_time.25893' WARNING: arch/ia64/mm/built-in.o - Section mismatch: reference to .init.data: from .sdata between 'hpage_shift' (at offset 0x78) and 'first_time.25893' WARNING: mm/built-in.o - Section mismatch: reference to .init.text:set_up_list3s from .text between 'kmem_cache_create' (at offset 0x56f82) and 'drain_alien_cache' WARNING: mm/built-in.o - Section mismatch: reference to .init.text:set_up_list3s from .text between 'kmem_cache_create' (at offset 0x57022) and 'drain_alien_cache' WARNING: mm/built-in.o - Section mismatch: reference to .init.data:early_node_map from .sdata before 'min_free_kbytes' (at offset -0x0) WARNING: mm/built-in.o - Section mismatch: reference to .init.data:early_node_map from .sdata before 'min_free_kbytes' (at offset -0x8) WARNING: mm/built-in.o - Section mismatch: reference to .init.data:early_node_map from .sdata before 'min_free_kbytes' (at offset -0x10) WARNING: mm/built-in.o - Section mismatch: reference to .init.data: from .sdata between 'hugetlb_infinity' (at offset 0x1d0) and 'slab_early_init' WARNING: mm/built-in.o - Section mismatch: reference to .init.data:initkmem_list3 from .sdata between 'hugetlb_infinity' (at offset 0x1d8) and 'slab_early_init' WARNING: mm/built-in.o - Section mismatch: reference to .init.data:initkmem_list3 from .sdata between 'hugetlb_infinity' (at offset 0x1e0) and 'slab_early_init' WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:sn_sal_console_setup from .data.rel between 'sal_console' (at offset 0x1c78) and 'ioc4_serial_submodule' WARNING: drivers/built-in.o - Section mismatch: reference to .init.data: from .sdata between 'scsi_null_device_strs' (at offset 0x8c0) and 'fc_dev_loss_tmo' OBJCOPY arch/ia64/hp/sim/boot/vmlinux.bin ------------------------------------------------------ -- Russ Anderson, OS RAS/Partitioning Project Lead SGI - Silicon Graphics Inc rja@sgi.com ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: linux-ia64 build warning messages 2007-06-05 14:55 ` linux-ia64 build warning messages Russ Anderson @ 2007-06-07 5:00 ` Peter Chubb 0 siblings, 0 replies; 41+ messages in thread From: Peter Chubb @ 2007-06-07 5:00 UTC (permalink / raw) To: Russ Anderson Cc: Luck Tony, Prarit Bhargava, Christoph Lameter, Randy Dunlap, David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg >>>>> "Russ" == Russ Anderson <rja@sgi.com> writes: Russ> Tony Luck wrote: >> > I used the sn2_defconfig in the tree :) >> >> So there is something odd happening. Russ complained that he was >> still seeing several errors from the sn2_defconfig build too when I >> posted the "last fix" to Len. But I don't see them when I build. Russ> An additional data point. I have a copy of Tony's test tree Russ> pulled down on March 30th that builds without the warning Russ> messages. The copy of Tony's test tree pulled down on May 22nd Russ> does have warning messages. I'm building both with the same Russ> compiler (etc). I'm fairly certain a tree I pulled down in Russ> April built without warnings. I've since blown away that tree. Change request 85bd2fddd68e757da8e1af98f857f61a3c9ce647 introduced section-mismatch checking for vmlinux, which caused all these warnings to become visible. It looks as if gcc can create references from .sdata to .init.sdata depending on what optimisations it chooses to do. Ideally we could teach gcc to put its constants in the same section they reference. But I'm no gcc guru. The alternative is to get modpost to ignore such references, at the cost of perhaps missing a real problem somewhere. -- Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au http://www.ertos.nicta.com.au ERTOS within National ICT Australia ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-31 0:09 ` Christoph Lameter 2007-05-31 2:37 ` Luck, Tony @ 2007-05-31 6:12 ` Randy Dunlap 1 sibling, 0 replies; 41+ messages in thread From: Randy Dunlap @ 2007-05-31 6:12 UTC (permalink / raw) To: Christoph Lameter Cc: Luck, Tony, David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg On Wed, 30 May 2007 17:09:56 -0700 (PDT) Christoph Lameter wrote: > On Wed, 30 May 2007, Randy Dunlap wrote: > > > OK. I would write the file to disk and view it with an editor. > > Then at each occurrence of /exit.text/, see if it's inside an __init > > function... > > Ahh okay. cscope will do that too.... But all have __exit. I did a cross-build, but I'm not having any luck finding the problem either. FWIW, mine shows up as: LD .tmp_vmlinux1 local symbol 0: discarded in section `.exit.text' from drivers/built-in.o make[1]: [.tmp_vmlinux1] Error 1 (ignored) KSYM .tmp_kallsyms1.S --- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-30 23:31 ` Christoph Lameter 2007-05-30 23:34 ` Randy Dunlap @ 2007-05-31 4:43 ` Sam Ravnborg 1 sibling, 0 replies; 41+ messages in thread From: Sam Ravnborg @ 2007-05-31 4:43 UTC (permalink / raw) To: Christoph Lameter Cc: Luck, Tony, David Chinner, Andrew Morton, lkml, linux-ia64 On Wed, May 30, 2007 at 04:31:35PM -0700, Christoph Lameter wrote: > On Wed, 30 May 2007, Luck, Tony wrote: > > > > > > `.exit.text' referenced in section `.init.text' of drivers/built-in.o: > > > defined in discarded section `.exit.text' of drivers/built-in.o > > > > > > This one is a fatal error ... the code is trying to call a function > > that has been marked __exit in a driver that has been built-in, instead > > of as a module. Since a builtin driver can never be unloaded, the kernel > > has thrown away all the __exit routines (at link time). > > > > The error message appears less than helpful in tracking down which > > routine in which driver is the problem though. > > Right. I have no idea where to look. The function has no name? Or is the > segment .exit.text referenced by namne in .init.text? Unfortunately modpost does not alows know how to resolve symbol names from addresses. Lately it has been improves by adding support for addends in ELF. But that is beyond my ELF knowledge atm so I cannot improve it. What you can do (apart from the cscope trick as Randy suggest) is to run modpost manual on all .o files in drivers/ If the cross reference happens in a single .o file you will get a hit there. And if it is say in scsi then you will get a hit in scsi/built-in.o Hope this helps. Sam ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-30 20:11 ` Luck, Tony 2007-05-30 22:39 ` Christoph Lameter @ 2007-05-31 0:53 ` David Chinner 2007-06-04 5:14 ` Peter Chubb 1 sibling, 1 reply; 41+ messages in thread From: David Chinner @ 2007-05-31 0:53 UTC (permalink / raw) To: Luck, Tony; +Cc: David Chinner, Andrew Morton, lkml, linux-ia64 On Wed, May 30, 2007 at 01:11:17PM -0700, Luck, Tony wrote: > > Hmmm - I wonder if my tree is screwed up in some weird way. I'm seeing link > > warnings as well: > > > > WARNING: init/built-in.o - Section mismatch: reference to .init.data: from .sdata after 'root_mountflags' (at offset 0x38) > > I thought that I'd got the section mis-match warnings down to > just one (and that was in ACPI code, so I sent a patch to Len > for it). > > Are you building from defconfig, or one of the standard ones? sn2defconfig + kernel debug option plus xfs options. > But I've had other complaints that these Section mismatch warnings > are still showing up in kernels built from the "standard" config > files (arch/ia64/configs/*) ... which I'm not seeing. So I'm more > than a little confused about this. > > These errors are unlikely to be related to the strace bug that > you've reported. I'll try to pound on this some more when I'm > back on the same continent as my test machines. Ok - no real hurry - they don't appear to be causing me any problems except build noise.... Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group ^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: BUG: sleeping function called from invalid context at kernel/fork.c:385 2007-05-31 0:53 ` David Chinner @ 2007-06-04 5:14 ` Peter Chubb 0 siblings, 0 replies; 41+ messages in thread From: Peter Chubb @ 2007-06-04 5:14 UTC (permalink / raw) To: David Chinner; +Cc: Luck, Tony, Andrew Morton, lkml, linux-ia64 I see many many section mismatches when compiling with gcc 4.1 and binutils 2.17.50.20070426 They appear to be from .sdata to .init.data. This is with basic zx1_defconfig with a few mods. The reason appears to be compiler weirdness.. WARNING: init/built-in.o(.sdata+0x30): Section mismatch: reference to .init.data:ino (after 'root_mountflags') (initramfs.s contains a 32-word table `head'. Code like: static __initdata struct hash {..} *head[32]; for (p = head; p < head + 32; p++) is generating: .section .sdata L24: .data8 head#+256 Rather than adding 256 to head at run time, the compiler loads L24 and uses that for the comparison. This triggers the warning. WARNING: arch/ia64/kernel/built-in.o(.sdata+0x110): Section mismatch: reference to .init.data:rsvd_region (between 'ia64_sal' and 'ia64_i_cache_stride_shift') WARNING: mm/built-in.o(.sdata+0x48): Section mismatch: reference to .init.data:early_node_map before 'sysctl_lowmem_reserve_ratio' (at offset -0x0) WARNING: mm/built-in.o(.sdata+0x50): Section mismatch: reference to .init.data:early_node_map before 'sysctl_lowmem_reserve_ratio' (at offset -0x0) WARNING: mm/built-in.o(.sdata+0x58): Section mismatch: reference to .init.data:early_node_map before 'sysctl_lowmem_reserve_ratio' (at offset -0x0) WARNING: mm/built-in.o(.sdata+0x60): Section mismatch: reference to .init.data:early_node_map before 'sysctl_lowmem_reserve_ratio' (at offset -0x0) WARNING: mm/built-in.o(.sdata+0x68): Section mismatch: reference to .init.data:early_node_map before 'sysctl_lowmem_reserve_ratio' (at offset -0x0) WARNING: mm/built-in.o(.sdata+0x70): Section mismatch: reference to .init.data:early_node_map before 'sysctl_lowmem_reserve_ratio' (at offset -0x0) WARNING: mm/built-in.o(.sdata+0x78): Section mismatch: reference to .init.data:early_node_map before 'sysctl_lowmem_reserve_ratio' (at offset -0x0) WARNING: mm/built-in.o(.sdata+0x80): Section mismatch: reference to .init.data:early_node_map before 'sysctl_lowmem_reserve_ratio' (at offset -0x0) WARNING: mm/built-in.o(.sdata+0x3c8): Section mismatch: reference to .init.data: (between 'swap_list' and 'slab_early_init') WARNING: mm/built-in.o(.sdata+0x3d8): Section mismatch: reference to .init.data:initkmem_list3 (between 'swap_list' and 'slab_early_init') WARNING: mm/built-in.o(.sdata+0x3e0): Section mismatch: reference to .init.data:initkmem_list3 (between 'swap_list' and 'slab_early_init') WARNING: drivers/built-in.o(.data.rel.local+0x20a8): Section mismatch: reference to .init.text:acpi_processor_start (between 'acpi_processor_driver' and 'acpi_thermal_driver') WARNING: drivers/built-in.o(.data.rel+0x1d80): Section mismatch: reference to .init.text:serial8250_console_setup (between 'serial8250_console' and 'dpm_active') WARNING: drivers/built-in.o(.sdata+0x788): Section mismatch: reference to .init.data: (between 'first.20152' and 'enabled') WARNING: drivers/built-in.o(.sdata+0x790): Section mismatch: reference to .init.data: (between 'first.20152' and 'enabled') WARNING: drivers/built-in.o(.sdata+0xa18): Section mismatch: reference to .init.data: (between 'scsi_null_device_strs' and 'fc_dev_loss_tmo') WARNING: drivers/built-in.o(.sdata+0xa20): Section mismatch: reference to .init.data: (between 'scsi_null_device_strs' and 'fc_dev_loss_tmo') WARNING: drivers/built-in.o(.sdata+0xa28): Section mismatch: reference to .init.data: (between 'scsi_null_device_strs' and 'fc_dev_loss_tmo') WARNING: drivers/built-in.o(.sdata+0xac8): Section mismatch: reference to .init.data: (between 'Symbios_trailer.24436' and 'try_direct_io') WARNING: drivers/built-in.o(.sdata+0xb00): Section mismatch: reference to .init.data: (between 'st_max_sg_segs' and 'osst_version') WARNING: arch/ia64/hp/common/built-in.o(.data.rel.local+0xa8): Section mismatch: reference to .init.text:acpi_sba_ioc_add (between 'acpi_sba_ioc_driver' and 'ioc_seq_ops') WARNING: arch/ia64/hp/common/built-in.o(.sdata+0x0): Section mismatch: reference to .init.data:__setup_str_sba_page_override before 'reserve_sba_gart' (at offset -0x20000000004c2613) -- Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au http://www.ertos.nicta.com.au ERTOS within National ICT Australia ^ permalink raw reply [flat|nested] 41+ messages in thread
[parent not found: <f1318b470705301650y5ed9fdbn12ad0ebe30233336@mail.gmail.com>]
* RE: BUG: sleeping function called from invalid context at kernel/fork.c:385 [not found] <f1318b470705301650y5ed9fdbn12ad0ebe30233336@mail.gmail.com> @ 2007-05-30 23:56 ` Yu, Fenghua 0 siblings, 0 replies; 41+ messages in thread From: Yu, Fenghua @ 2007-05-30 23:56 UTC (permalink / raw) To: Luck, Tony, David Chinner, Andrew Morton, lkml, linux-ia64, Sam Ravnborg, Christoph Lameter > Saw this when running strace -f on a script on 2.6.21 on ia64 Run strace -f on 2.6.22-rc3 on Tiger4/Montecito. Couldn't reproduce this issue. Kernel was built with both defconfig and tiger_defconfig. Thanks. -Fenghua ^ permalink raw reply [flat|nested] 41+ messages in thread
end of thread, other threads:[~2007-06-07 5:20 UTC | newest]
Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-23 6:31 BUG: sleeping function called from invalid context at kernel/fork.c:385 David Chinner
2007-05-23 6:43 ` Andrew Morton
2007-05-23 17:44 ` Luck, Tony
2007-05-30 3:30 ` David Chinner
2007-05-30 4:44 ` David Chinner
2007-05-30 20:11 ` Luck, Tony
2007-05-30 22:39 ` Christoph Lameter
2007-05-30 23:19 ` Luck, Tony
2007-05-30 23:31 ` Christoph Lameter
2007-05-30 23:34 ` Randy Dunlap
2007-05-30 23:53 ` Christoph Lameter
2007-05-30 23:55 ` Randy Dunlap
2007-05-31 0:09 ` Christoph Lameter
2007-05-31 2:37 ` Luck, Tony
2007-05-31 3:19 ` Christoph Lameter
2007-05-31 15:20 ` Prarit Bhargava
2007-05-31 19:54 ` Sam Ravnborg
2007-05-31 20:04 ` Sam Ravnborg
2007-05-31 20:08 ` [PATCH] net/hp100: fix section mismatch warning Sam Ravnborg
2007-05-31 20:17 ` [PATCH] kvm: fix section mismatch warning in kvm-intel.o Sam Ravnborg
2007-05-31 20:24 ` [PATCH] acpi: fix section mismatch warning in asus_acpi.o Sam Ravnborg
2007-05-31 20:29 ` [PATCH] acpi: fix section mismatch warning in asus + toshiba Sam Ravnborg
2007-05-31 20:46 ` [PATCH] isdn: fix section mismatch warnings Sam Ravnborg
2007-05-31 20:51 ` [PATCH] microcode: fix section mismatch warning Sam Ravnborg
2007-05-31 20:42 ` BUG: sleeping function called from invalid context at kernel/fork.c:385 Christoph Lameter
2007-06-01 3:18 ` Luck, Tony
2007-06-01 3:31 ` Prarit Bhargava
2007-06-01 4:05 ` Christoph Lameter
2007-06-01 4:17 ` Sam Ravnborg
2007-06-01 4:45 ` Christoph Lameter
2007-06-01 6:42 ` Sam Ravnborg
2007-06-01 8:00 ` Luck, Tony
2007-06-01 10:30 ` Prarit Bhargava
2007-06-01 10:37 ` Luck, Tony
2007-06-05 14:55 ` linux-ia64 build warning messages Russ Anderson
2007-06-07 5:00 ` Peter Chubb
2007-05-31 6:12 ` BUG: sleeping function called from invalid context at kernel/fork.c:385 Randy Dunlap
2007-05-31 4:43 ` Sam Ravnborg
2007-05-31 0:53 ` David Chinner
2007-06-04 5:14 ` Peter Chubb
[not found] <f1318b470705301650y5ed9fdbn12ad0ebe30233336@mail.gmail.com>
2007-05-30 23:56 ` Yu, Fenghua
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox