Skip to contentSkip to conversation

aic7xxx kobject crap

DISCUSSION Jens Axboe 3 participants 5 messages Apr 27, 2004 SCSI

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

Hi,

I've given up trying to follow the kobject stuff going on in the driver model, it's just one big maze of container_of() and foo_get() functions. Loading the aic7xxx module gives a nice oops:

Oops: 0002 [#1] 
CPU:    0 
EIP:    0060:[<c01da5f6>]    Not tainted 
EFLAGS: 00010292   (2.6.5-5-default)  

EIP is at kobject_add+0x66/0x130
eax: c034bd20 ebx: e127307c ecx: e129aed8 edx: e1273098
esi: e1273080 edi: e1273064 ebp: c034bd28 esp: df273db0
ds: 007b es: 007b ss: 0068
Process insmod (pid: 378, threadinfo=df272000 task=df274130)

Stack: e127307c ffffffea e1273064 00000000 c01da749 e127307c c034bcc0
c021f64f  
       e127307c e1264498 e1273040 00000000 e12730d8 c0341db8 c021fad8
c0342484  
       00000010 c1020000 c0342478 c01e378b c0341dc8 00000000 c0341db8
e12614ca  
Call Trace: 
 [<c01da749>] kobject_register+0x19/0x3f 
 [<c021f64f>] bus_add_driver+0x2f/0x80 
 [<c021fad8>] driver_register+0x28/0x30 
 [<c01e378b>] pci_register_driver+0x4b/0x80 
 [<e12614ca>] ahc_linux_pci_init+0xa/0x990 [aic7xxx] 
 [<e10f919c>] ahc_linux_init+0x19c/0x29b [aic7xxx] 
 [<c013cfe0>] free_hot_cold_page+0xd0/0xf0 
 [<c0131ab5>] sys_init_module+0x105/0x15b0 
 [<c01234a0>] __request_region+0x0/0x80 
 [<e10f9000>] ahc_linux_init+0x0/0x29b [aic7xxx] 
 [<c014dd17>] do_shmem_file_read+0x227/0x2e0 
 [<c014de89>] shmem_file_read+0x69/0x80 
 [<c0138560>] file_read_actor+0x0/0xe0 
 [<c014de20>] shmem_file_read+0x0/0x80 
 [<c015538e>] __fput+0x9e/0xf0 
 [<c0107e27>] syscall_call+0x7/0xb 
 
Code: 89 11 8b 43 28 8b 30 8d 4e 48 89 c8 ba ff ff 00 00 0f c1 10  

tracing this, we end up in list_add_tail() in kobject_add() add:

	list_add_tail(&kobj->entry,&kobj->kset->list);

and oops occurs when __list_add() derefs kobj->kset->list.prev since that is NULL, ie it was never initialized. It looks like kset_init() sets this up, apparently that was never called for this kset.

Signature · 1 line
Jens Axboe
#1 lore raw
Quoted 5 lines · Jens Axboe

Hi,

I've given up trying to follow the kobject stuff going on in the driver model, it's just one big maze of container_of() and foo_get() functions. Loading the aic7xxx module gives a nice oops:

That's wierd, I'll go try to duplicate it. Had you previously loaded and then unloaded the same module? Do you have a aic7xxx device in the system at the time you loaded it? Any other hints on how to duplicate it?

thanks,

greg k-h

author
#2 lore raw
Quoted 11 lines · Greg KH
Quoted 5 lines · Jens Axboe

Hi,

I've given up trying to follow the kobject stuff going on in the driver model, it's just one big maze of container_of() and foo_get() functions. Loading the aic7xxx module gives a nice oops:

That's wierd, I'll go try to duplicate it. Had you previously loaded and then unloaded the same module? Do you have a aic7xxx device in the system at the time you loaded it? Any other hints on how to duplicate it?

I wish I could say more, I'll have to ask to get more info. All I know is that it happens during install. So my current assumption is that it happens the very first time the module is loaded, and the machine does have some sort of aic7xxx device attached (or onboard). I'll get confirmation on that.

Signature · 1 line
Jens Axboe
#3 lore raw
Quoted 5 lines · Jens Axboe

I wish I could say more, I'll have to ask to get more info. All I know is that it happens during install. So my current assumption is that it happens the very first time the module is loaded, and the machine does have some sort of aic7xxx device attached (or onboard). I'll get confirmation on that.

Actually, there's already a report of a kobject screw up in aic7xxx if the module is loaded with no hardware present:

http://marc.theaimsgroup.com/?t=107754715800005&r=1&w=2

There's also a patch here if it is the reported problem:

http://marc.theaimsgroup.com/?l=linux-scsi&m=107760949410870&w=2

James

author
#4 lore raw
Quoted 7 lines · James Bottomley
Quoted 5 lines · Jens Axboe

I wish I could say more, I'll have to ask to get more info. All I know is that it happens during install. So my current assumption is that it happens the very first time the module is loaded, and the machine does have some sort of aic7xxx device attached (or onboard). I'll get confirmation on that.

Quoted 8 lines

Actually, there's already a report of a kobject screw up in aic7xxx if the module is loaded with no hardware present:

http://marc.theaimsgroup.com/?t=107754715800005&r=1&w=2

There's also a patch here if it is the reported problem:

http://marc.theaimsgroup.com/?l=linux-scsi&m=107760949410870&w=2

The post you link to is one where kobject_unregister() craps out, my post was for loading. The 'fix' appears to just keep the module loaded, I don't think that'll do much here :-)

Signature · 1 line
Jens Axboe