Bug 148785 (pci_get_device-oops)

Summary: pci_get_device generates kernel oops
Product: [Fedora] Fedora Reporter: BJ <prof.bj>
Component: kernelAssignee: Dave Jones <davej>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: high Docs Contact:
Priority: medium    
Version: 3CC: pfrields, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-03-13 13:30:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description BJ 2005-02-15 16:45:08 UTC
Description of problem:
If I try to insert the mga_vid module then I get always kernel oops.
It seems to be a Kernel problem (read the log below)

Version-Release number of selected component (if applicable):
2.6.10-1.766_FC3

How reproducible:
Always

Steps to Reproduce:
1. Download the module source from
http://attila.kinali.ch/mga/mga-vid-2.6.10-2005-01-11.tar.gz
2. apply patch because of deprecated remap_page_range()
http://mplayerhq.hu/pipermail/mplayer-matrox/2005-January/000098.html 
3. make && make install
4. create mga_vid device (c 178 0)
5. modprobe mga_vid
  
Actual (extract of) results:
Feb 15 14:09:09 stghome kernel: Matrox MGA G200/G400/G450/G550 YUV
Video interface v2.01 (c) Aaron Holtzman & A'rpi
Feb 15 14:09:09 stghome kernel: Unable to handle kernel paging request
at virtual address 4d3e3660
Feb 15 14:09:09 stghome kernel:  printing eip:
Feb 15 14:09:09 stghome kernel: c01e043e
Feb 15 14:09:09 stghome kernel: *pde = 00000000
Feb 15 14:09:09 stghome kernel: Oops: 0000 [#1]

Feb 15 14:09:09 stghome kernel: CPU:    0
Feb 15 14:09:09 stghome kernel: EIP:    0060:[<c01e043e>]    Not
tainted VLI
Feb 15 14:09:09 stghome kernel: EFLAGS: 00210213   (2.6.10-1.766_FC3)
Feb 15 14:09:09 stghome kernel: EIP is at pci_get_subsys+0xec/0x1b5
Feb 15 14:09:09 stghome kernel: eax: 00000000   ebx: 4d3e363c   ecx:
ffffffff   edx: 4d3e363c


Expected results:
morking module

Additional info:

Comment 1 Sitsofe Wheeler 2005-02-16 22:39:50 UTC
How do you konw this isn't a problem caused by the mga-vid kernel module? What's
the rest of the stack trace like? If the problem is in the module then you will
have to take up this issue to whoever supplied it to you because FC3 doesn't
ship with it...

Comment 2 BJ 2005-02-17 22:11:46 UTC
(In reply to comment #1)
> How do you konw this isn't a problem caused by the mga-vid kernel module? What's
> the rest of the stack trace like? If the problem is in the module then you will
> have to take up this issue to whoever supplied it to you because FC3 doesn't
> ship with it...

I guess it because of two things:
-the kernel log file
-the same module should work fine under debian (I have _only_ FC3)

The complete log (from today ;):
Matrox MGA G200/G400/G450/G550 YUV Video interface v2.01 (c) Aaron Holtzman & A'rpi
Unable to handle kernel paging request at virtual address 4d3e3660
 printing eip:
c01e043e
*pde = 00000000
Oops: 0000 [#1]
Modules linked in: mga_vid(U) tuner tda9887 msp3400 bttv video_buf i2c_algo_bit
v4l2_common btcx_risc videodev usblp udf mga parport_pc lp parport autofs4
i2c_dev i2c_core sunrpc ipt_REJECT ipt_state ip_conntrack iptable_filter
ip_tables md5 ipv6 ext3 jbd dm_mod video button battery ac joydev ohci1394
ieee1394 uhci_hcd ehci_hcd snd_intel8x0 snd_ac97_codec snd_pcm_oss snd_mixer_oss
snd_pcm snd_timer snd soundcore snd_page_alloc 8139too mii floppy
CPU:    0
EIP:    0060:[<c01e043e>]    Not tainted VLI
EFLAGS: 00210213   (2.6.10-1.766_FC3)
EIP is at pci_get_subsys+0xec/0x1b5
eax: 00000000   ebx: 4d3e363c   ecx: ffffffff   edx: 4d3e363c
esi: e0ca29c0   edi: ffffffff   ebp: c5de9f9c   esp: c5de9f74
ds: 007b   es: 007b   ss: 0068
Process modprobe (pid: 7726, threadinfo=c5de9000 task=ca61e7a0)
Stack: 00000057 e0ca3e00 00000000 00562afa c5de9fb0 c01e0512 ffffffff e0ca29c0
       e0ca2145 0000102b ffffffff 00000000 00562afa 09550c18 00562afa c5de9000
       c01374b9 095569a8 09550c18 c0103443 095569a8 0000a363 09550c18 09550c18
Call Trace:
 [<c01e0512>] pci_get_device+0xb/0xe
 [<e0ca2145>] mga_vid_initialize+0x25/0x2e0 [mga_vid]
 [<c01374b9>] sys_init_module+0x1d8/0x2a8
 [<c0103443>] syscall_call+0x7/0xb
Code: 84 31 c0 c7 05 90 a8 35 c0 eb 00 00 00 74 04 8b 16 eb 4e 8b 15 68 a5 35 c0
eb 46 81 fa 68 a5 35 c0 74 42 83 3c 24 ff 89 d3 74 09 <0f> b7 42 24 3b 04 24 75
2b 83 fd ff 74 08 0f b7 43 26 39 e8 75

That's it...

Comment 3 BJ 2005-03-13 13:30:34 UTC
The problem was in the driver not in the kernel.
Bug fixed in the driver.