Jim Cromie wrote:
attached is a cut-down patch that attempts to convert scx200_gpio
to use the new 2.6 char-dev-driver API.
Its closely modelled after LDD-3 scull driver.
it segfaults reliably on cat /proc/devices after rmmod'g
tested against 12-rc4-mm2, I think it will apply to 12-rc[45]
and heres the segfault itself :-}
# ./segflt-repeat
scx200: NatSemi SCx200 Driver
scx200: GPIO base 0x6100
scx200: Configuration Block base 0x6000
Character devices:
1 mem
2 pty
3 ttyp
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
7 vcs
10 misc
13 input
29 fb
128 ptm
136 pts
180 usb
254 scx200_gpio
Block devices:
3 ide0
7 loop
Unable to handle kernel paging request at virtual address c882f507
printing eip:
c014dd0a
*pde = 01267067
*pte = 00000000
Oops: 0000 [#1]
Modules linked in: scx200 usbcore
CPU: 0
EIP: 0060:[<c014dd0a>] Not tainted VLI
EFLAGS: 00010246 (2.6.12-rc4-mm2-soekris-v1)
EIP is at get_chrdev_list+0x4a/0xa0
eax: 00000000 ebx: c7f28980 ecx: ffffffff edx: c882f507
esi: 000000b1 edi: c882f507 ebp: ffffffff esp: c6595f0c
ds: 007b es: 007b ss: 0068
Process cat (pid: 1126, threadinfo=c6594000 task=c75c2520)
Stack: 000000fe 00000000 c6572000 00000000 c6572000 c01798ac c6572000
00000000
00000c00 c017699e c6572000 c6595f58 00000000 00000c00 c6595f54
00000000
c113c620 00000000 00000000 00000000 00001000 c69f4260 c6595fa4
0804d038
Call Trace:
[<c01798ac>] devices_read_proc+0xc/0x40
[<c017699e>] proc_file_read+0xae/0x260
[<c01460da>] vfs_read+0x13a/0x150
[<c014636d>] sys_read+0x3d/0x70
[<c01029a9>] syscall_call+0x7/0xb
Code: 88 52 08 00 00 c7 04 24 00 00 00 00 90 8d 74 26 00 8b 04 24 8b 1c
85 60 05 40 c0 85 db 74 3e 83 cd ff 8b 53 10 89 e9 89 d7 31 c0 <f2> ae
f7 d1 49 8d 4c 31 05 81 f9 ff 0f 00 00 77 31 52 8b 7b 04
./segflt-repeat: line 33: 1126 Segmentation fault cat /proc/devices
<7>bus pci: remove driver scx200
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/