Bug 5657

Summary: Segmentation fault reading /proc/ioports after loading the i82365 module
Product: Drivers Reporter: Francesco (spookyghost)
Component: PCMCIAAssignee: Dominik Brodowski (linux)
Status: CLOSED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: bunk
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.14 and 2.6.14.2 Subsystem:
Regression: --- Bisected commit-id:

Description Francesco 2005-11-25 01:55:01 UTC
Most recent kernel where this bug did not occur: 2.6.13
Distribution:Slackware 10.2
Hardware Environment: IBM ThinkPad R50
Software Environment:
Problem Description:Reading /proc/ioports with cat, grep or other command i
receive  a segmentation fault error. In the syslog i see this message:

 kernel: Unable to handle kernel paging request at virtual address d034b7a2
 kernel:  printing eip:
 kernel: c019cc3a
 kernel: *pde = 01227067
 kernel: *pte = 00000000
 kernel: Oops: 0000 [#1]
 kernel: Modules linked in: i915 drm ibm_acpi button thermal processor fan ac\
   battery ipt_length iptable_filter ip_conntrack_tftp ipt_conntrack ipt_state\
   ipt_LOG ip_tables ip_conntrack_irc ip_conntrack_ftp ip_conntrack ohci_hcd\
   intel_agp uhci_hcd ehci_hcd shpchp i8xx_tco tpm_atmel tpm_nsc tpm i2c_i801\
   i2c_core snd_intel8x0 snd_ac97_codec snd_ac97_bus snd_pcm snd_timer snd\
   soundcore snd_page_alloc eepro100 mii pcmcia firmware_class yenta_socket\
   rsrc_nonstatic pcmcia_core nls_iso8859_1 nls_cp437 vfat fat agpgart psmouse\
   reiserfs jbd
 kernel: CPU:    0
 kernel: EIP:    0060:[<c019cc3a>]    Not tainted VLI
 kernel: EFLAGS: 00010297   (2.6.14.2)
 kernel: EIP is at vsnprintf+0x34a/0x4e0
 kernel: eax: d034b7a2   ebx: 0000000a   ecx: d034b7a2   edx: fffffffe
 kernel: esi: c579910a   edi: 00000000   ebp: c5799fff   esp: cb747ed8
 kernel: ds: 007b   es: 007b   ss: 0068
 kernel: Process grep (pid: 6976, threadinfo=cb746000 task=cf587540)
 kernel: Stack: ffffffff ffffffff ce206340 ce4d52c0 ce206340 000000fe c016e3b4
c57990fe
 kernel:        00000f02 c0301c86 cb747f30 000003e1 c011cc06 ce206340 c0301c74
00000000
 kernel:        c02fc024 00000004 000003e0 00000004 000003e1 d034b7a2 ce206340
00000000
 kernel: Call Trace:
 kernel:  [<c016e3b4>] seq_printf+0x24/0x50
 kernel:  [<c011cc06>] r_show+0x66/0x70
 kernel:  [<c016defb>] seq_read+0x1bb/0x2a0
 kernel:  [<c015053f>] vfs_read+0x9f/0x150
 kernel:  [<c015088d>] sys_read+0x3d/0x70
 kernel:  [<c0102e69>] syscall_call+0x7/0xb
 kernel: Code: 44 24 04 08 00 00 00 83 cf 01 eb d2 8b 44 24 28 83 44 24 28 04 8b
08 81 f9 ff 0f 00 00 77
 05 b9 0c 8c 30 c0 8b 14 24 89 c8 eb 06 <80> 38 00 74 07 40 4a 83 fa ff 75 f4 29
c8 83 e7 10 89 c3 75 20

The problem seem caused during the startup seguence when system try to determine
which pcmcia modules have to use. It try to load i82365 module that was,
probably, not correctly unloaded.

Steps to reproduce:

modprobe i82365

Cat /proc/ioports
Comment 1 Dominik Brodowski 2005-12-05 21:33:44 UTC
A patch for this can be found at
http://bugzilla.kernel.org/attachment.cgi?id=6525&action=view at bug 3676.
Comment 2 Dominik Brodowski 2005-12-05 21:34:06 UTC

*** This bug has been marked as a duplicate of 3676 ***
Comment 3 Dominik Brodowski 2005-12-06 23:41:57 UTC
Sorry, it was another known bug... 

http://kernel.org/git/?p=linux/kernel/git/brodo/pcmcia-2.6.git;a=commitdiff;h=a2932b35a0efd01b20a3f598d19db052d64935f5

Patch is on its way to the stable team.