2.2.18pre7 [OOPS] + [PATCH]

From: Andrzej Krzysztofowicz (kufel!ankry)
Date: Fri Sep 15 2000 - 17:08:21 EDT

  • Next message: Alexander Viro: "Re: bug in blkdev <-> VFS interaction. (oops) (fwd)"

    axboe@image.dk, cox

    Hi,

       I think, I found accidentally a bug in the universal cdrom driver with no
    /proc fs support. The following configuration gives me an oops during boot
    (key options):

    CONFIG_SYSCTL=y
    CONFIG_SCSI=y
    CONFIG_BLK_DEV_SR=y
    CONFIG_SCSI_QLOGIC_FAS=y
    # CONFIG_PROC_FS is not set

    Oops, and patch that fixes it for build-in cdrom.c follows.

    Unfortunately I'm not sure whether it is correct, that MOD_INC_USE_COUNT /
    MOD_DEC_USE_COUNT for cdrom module are called only via /proc interface and
    can't work when /proc is disabled ...
    Well, maybe the module is locked in an alteranative way ? Can anybody confirm
    it ?

    Unable to handle NULL pointer dereference at virtual address 0000001c
    current->tss.cr3 = 00101000, %cr3 = 00101000
    *pde = 00000000
    Oops: 0002
    CPU: 0
    EIP: 0010:[<c01a65f6>]
    EFLAGS: 00010202
    eax: 00000000 ebx: c01df3f8 ecx: 00000000 edx: c7ffc0e0
    esi: c01df42c edi: c7ff3018 ebp: 0000000b esp: c7ff9f74
    ds: 0018 es: 0018 ss: 0018
    Process swapper (pid: 1, process nr: 1, stackpage=c7ff9000)
    Stack: c01a1e33 c01c69cc 00000000 c7ff9fac c7ff3040 00000000 c019f930 c7ff3018
           c01df3c0 00000000 00000000 00000000 c7ff9fa8 00307273 00000000 c01ea343
           00000f00 c01e1fd8 c0106000 c01e733d 00000f00 c01e1fd8 c0106000 00008000
    Call Trace: [<c01a1e33>] [<c01c69cc>] [<c019f930>] [<c0106000>] [<c0106000>] [<c011ef48>] [<c0106093>]
           [<c0106527>]
    Code: c7 40 1c d0 65 1a c0 a1 cc f4 1d c0 a3 84 b3 20 c0 a1 d0 f4

    4533 symbols from /usr/src/kernel/2.2/linux/System.map

    EIP: 0xc01a65f6 t cdrom_sysctl_register+0x22/0x6c
    trace: 0xc01a1e33 T register_cdrom+0x73/0x1d8
    trace: 0xc01c69cc T stext_lock+0xf5d8/0x19f5c
    trace: 0xc019f930 t sr_finish+0x128/0x178
    trace: 0xc0106000 T get_options+0x0/0x74
    trace: 0xc0106000 T get_options+0x0/0x74
    trace: 0xc011ef48 T kswapd+0x0/0x9c
    trace: 0xc0106093 t init+0x7/0x140
    trace: 0xc0106527 T kernel_thread+0x23/0x30
    code: 00000000 <oops>:
    code: 0: c7 40 1c d0 65 1a c0 movl $0xc01a65d0,0x1c(%eax)
    code: 7: a1 cc f4 1d c0 mov 0xc01df4cc,%eax
    code: c: a3 84 b3 20 c0 mov %eax,0xc020b384
    code: 11: a1 .byte 0xa1
    code: 12: d0 (bad)
    code: 13: f4 hlt

    --- drivers/cdrom/cdrom.c.old Fri Sep 15 22:09:44 2000
    +++ drivers/cdrom/cdrom.c Fri Sep 15 22:48:28 2000
    @@ -2557,6 +2557,7 @@
     
     static struct ctl_table_header *cdrom_sysctl_header;
     
    +#ifdef CONFIG_PROC_FS
     /*
      * This is called as the fill_inode function when an inode
      * is going into (fill = 1) or out of service (fill = 0).
    @@ -2573,6 +2574,7 @@
                     MOD_DEC_USE_COUNT;
             }
     }
    +#endif /* CONFIG_PROC_FS */
     
     static void cdrom_sysctl_register(void)
     {
    @@ -2582,7 +2584,9 @@
                     return;
     
             cdrom_sysctl_header = register_sysctl_table(cdrom_root_table, 1);
    +#ifdef CONFIG_PROC_FS
             cdrom_root_table->child->de->fill_inode = &cdrom_procfs_modcount;
    +#endif /* CONFIG_PROC_FS */
     
             /* set the defaults */
             cdrom_sysctl_settings.autoclose = autoclose;

    -- 
    =======================================================================
      Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
      tel.  (0-58) 347 14 61
    Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    Please read the FAQ at http://www.tux.org/lkml/
    



    This archive was generated by hypermail 2b29 : Sat Sep 16 2000 - 12:00:19 EDT