PCI ERROR: Segmentation fault in pci_do_scan_bus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi 

I am getting segmentation fault, consistently on call to
'pci_do_scan_bus'. This is a small test code ( attached with this mail)
to test the APIs exposed by the PCI subsystem. I just checked where it
faults and found out that inside 'sysfs_create_bin_file' it is not able
to find the kobject out of the dev pointer passed to it. Now extracting
of the dev object out of the bus pointer is done by
'list_for_each_entry(dev, &bus->devices, bus_list)' in
'pci_bus_add_devices'. Now I am not able to understand why the kobject
is missing. Is it something that I am missing or is it a kernel defect?
Any help in this will be really appreciated. The bug message is pasted
below.

The kernel version is linux 2.6.14.  

========================================================================
======================================
kernel BUG at fs/sysfs/bin.c:184!
invalid operand: 0000 [#1]
Modules linked in: tpci parport_pc lp parport autofs4 sunrpc
iptable_filter ip_tables button battery ac ipv6 uhci_hcd i2c_i801
i2c_core snd_intel8x0 snd_ac97_codec snd_ac97_bus snd_pcm_oss
snd_mixer_oss snd_pcm snd_timer snd soundcore snd_page_alloc e1000
floppy dm_snapshot dm_zero dm_mirror dm_mod
CPU:    0
EIP:    0060:[<c01a29a1>]    Not tainted VLI
EFLAGS: 00010202   (2.6.14-skas3-v8.2)
EIP is at sysfs_create_bin_file+0x41/0x50
eax: c8bbf701   ebx: 00000000   ecx: 00000001   edx: c03bf700
esi: c03bf700   edi: d76c83a0   ebp: 00000000   esp: d348fee8
ds: 007b   es: 007b   ss: 0068
Process test_pci (pid: 4626, threadinfo=d348e000 task=c8da5560)
Stack: c893b400 c893b4ec c01feb5a c893b400 c893b400 d76c83b4 d76c83a0
00000000
       c01f967c d76c83a0 00000001 00006b08 c01fa9ea d76c83a0 00000000
d8989631
       d898a068 d76c83a0 00000000 d898924a d8989bb0 00000000 00000000
00000000
Call Trace:
 [<c01feb5a>] pci_create_sysfs_dev_files+0x4a/0x140
 [<c01f967c>] pci_bus_add_devices+0x3c/0xd0
 [<c01fa9ea>] pci_do_scan_bus+0x1a/0x30
 [<d8989631>] test_scan_bus+0x21/0x60 [tpci]
 [<d898924a>] tpci_ioctl+0x20a/0x2b0 [tpci]
 [<d8989040>] tpci_ioctl+0x0/0x2b0 [tpci]
 [<c0172bc0>] do_ioctl+0x50/0x80
 [<c0172d2e>] vfs_ioctl+0x5e/0x1c0
 [<c015f67f>] vfs_write+0x12f/0x180
 [<c0172f07>] sys_ioctl+0x77/0x90
 [<c010301f>] sysenter_past_esp+0x54/0x75
Code: 94 c0 85 d2 0f 94 c2 09 d0 a8 01 75 1e 89 f2 89 d8 8b 74 24 04 8b
1c 24 b9 08 00 00 00 83 c4 08 e9 85 df ff ff 8b 1d 30 00 00 00 <0f> 0b
b8 00 52 ff 36 c0 eb d8 90 8d 74 26 00 8b 40 30 8b 12 e8

========================================================================
==================================

Please, let me know if any more info is required.

Thanks
Biswa


Attachment: test.tar.bz2
Description: test.tar.bz2


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux