[PATCH] Oopses in apply_alternatives

From: Petr Vandrovec (vandrove@vc.cvut.cz)
Date: Wed Apr 23 2003 - 16:30:38 EST


Hi Rusty,
  I somehow missed apply_alternatives inclusion into the kernel, so
I have no idea whether you are right person...

  It is not good idea to call apply_alternatives from module_finalize,
as apply_alternatives is __init function... It spectaculary crashed
here while inserting VMware's vmnet module. In standard kernel
.altinstructions section occurs (from few modules I have) in uhci-hcd
and usbcore.

  Patch below appears to fix problem.

vana:/tmp/vmware-config0$ objdump -h vmnet.o

vmnet.o: file format elf32-i386

Sections:
Idx Name Size VMA LMA File off Algn
  0 .text 00003f3d 00000000 00000000 00000034 2**2
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
  1 .fixup 00000014 00000000 00000000 00003f71 2**0
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
  2 __ksymtab_strings 00000075 00000000 00000000 00003f85 2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 __ksymtab 00000040 00000000 00000000 00003ffc 2**2
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
  4 .rodata.str1.32 00000ae0 00000000 00000000 00004040 2**5
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  5 .rodata.str1.1 000001ba 00000000 00000000 00004b20 2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  6 __ex_table 00000010 00000000 00000000 00004cdc 2**2
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
  7 .altinstructions 0000000a 00000000 00000000 00004cec 2**2
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA
  8 .data 00000458 00000000 00000000 00004d00 2**5
                  CONTENTS, ALLOC, LOAD, RELOC, DATA
  9 .gnu.linkonce.this_module 00000280 00000000 00000000 00005180 2**7
                  CONTENTS, ALLOC, LOAD, RELOC, DATA, LINK_ONCE_DISCARD
 10 .bss 00000058 00000000 00000000 00005400 2**5
                  ALLOC
 11 .comment 0000011a 00000000 00000000 00005400 2**0
                  CONTENTS, READONLY

                                        Best regards,
                                                Petr Vandrovec
                                                vandrove@vc.cvut.cz

--- linux-2.5.68-c1179.dist/arch/i386/kernel/setup.c 2003-04-23 14:13:22.000000000 +0200
+++ linux-2.5.68-c1179/arch/i386/kernel/setup.c 2003-04-23 23:18:45.000000000 +0200
@@ -802,7 +802,7 @@
    APs have less capabilities than the boot processor are not handled.
     
    In this case boot with "noreplacement". */
-void __init apply_alternatives(void *start, void *end)
+void apply_alternatives(void *start, void *end)
 {
         struct alt_instr *a;
         int diff, i, k;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Apr 23 2003 - 22:00:38 EST