Wilfried Klaebe
1c594c05a7
b1isa: fix b1isa_exit() to really remove registered capi controllers
On "/etc/init.d/capiutils stop", this oops happened.
The oops happens on reading /proc/capi/controllers because
capi_ctrl->procinfo is called for the wrongly not unregistered
controller, which points to b1isa_procinfo(), which was removed on
module unload.
b1isa_exit() did not call b1isa_remove() for its controllers because
io[0] == 0 on module unload despite having been 0x340 on module load.
Besides, just removing the controllers that where added on module
load time and not those that were added later via b1isa_add_card() is
wrong too - the place where all added cards are found is isa_dev[].
relevant dmesg lines:
[ 0.000000] Linux version 2.6.27.4 (w@shubashi) (gcc version 4.3.2 (Debian 4.3.2-1) ) #3 Thu Oct 30 16:49:03 CET 2008
[ 67.403555] CAPI Subsystem Rev 1.1.2.8
[ 68.529154] capifs: Rev 1.1.2.3
[ 68.563292] capi20: Rev 1.1.2.7: started up with major 68 (middleware+capifs)
[ 77.026936] b1: revision 1.1.2.2
[ 77.049992] b1isa: revision 1.1.2.3
[ 77.722655] kcapi: Controller [001]: b1isa-340 attached
[ 77.722671] b1isa: AVM B1 ISA at i/o 0x340, irq 5, revision 255
[ 81.272669] b1isa-340: card 1 "B1" ready.
[ 81.272683] b1isa-340: card 1 Protocol: DSS1
[ 81.272689] b1isa-340: card 1 Linetype: point to multipoint
[ 81.272695] b1isa-340: B1-card (3.11-03) now active
[ 81.272702] kcapi: card [001] "b1isa-340" ready.
[ 153.721281] kcapi: card [001] down.
[ 154.151889] BUG: unable to handle kernel paging request at e87af000
[ 154.152081] IP: [<e87af000>]
[ 154.153292] *pde = 2655b067 *pte = 00000000
[ 154.153307] Oops: 0000 [#1]
[ 154.153360] Modules linked in: rfcomm l2cap ppdev lp ipt_MASQUERADE tun capi capifs kernelcapi ac battery nfsd exportfs nfs lockd nfs_acl sunrpc sit tunnel4 bridge stp llc ipt_REJECT ipt_LOG xt_tcpudp xt_state iptable_filter iptable_mangle iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack ip_tables x_tables nls_utf8 isofs nls_base zlib_inflate loop ipv6 netconsole snd_via82xx dvb_usb_dib0700 gameport dib7000p dib7000m dvb_usb snd_ac97_codec ac97_bus dvb_core mt2266 snd_pcm tuner_xc2028 dib3000mc dibx000_common mt2060 dib0070 snd_page_alloc snd_mpu401_uart snd_seq_midi snd_seq_midi_event btusb snd_rawmidi bluetooth snd_seq snd_timer snd_seq_device snd via686a i2c_viapro soundcore i2c_core parport_pc parport button dm_mirror dm_log dm_snapshot floppy sg ohci1394 uhci_hcd ehci_hcd 8139too mii ieee1394 usbcore sr_mod cdrom sd_mod thermal processor fan [last unloaded: b1]
[ 154.153360]
[ 154.153360] Pid: 4132, comm: capiinit Not tainted (2.6.27.4 #3)
[ 154.153360] EIP: 0060:[<e87af000>] EFLAGS: 00010286 CPU: 0
[ 154.153360] EIP is at 0xe87af000
[ 154.153360] EAX: e6b9ccc8 EBX: e6b9ccc8 ECX: e87a0c67 EDX: e87af000
[ 154.153360] ESI: e142bbc0 EDI: e87a56e0 EBP: e0505f0c ESP: e0505ee4
[ 154.153360] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
[ 154.153360] Process capiinit (pid: 4132, ti=e0504000 task=d1196cf0 task.ti=e0504000)
[ 154.153360] Stack: e879f650 00000246 e0505ef4 c01472eb e0505f0c 00000246 e7001780 fffffff4
[ 154.153360] fffffff4 e142bbc0 e0505f48 c01a56c6 00000400 b805e000 d102dc80 e142bbe0
[ 154.153360] 00000000 e87a56e0 00000246 e12617ac 00000000 00000000 e1261760 fffffffb
[ 154.153360] Call Trace:
[ 154.153360] [<e879f650>] ? controller_show+0x20/0x90 [kernelcapi]
[ 154.153360] [<c01472eb>] ? trace_hardirqs_on+0xb/0x10
[ 154.153360] [<c01a56c6>] ? seq_read+0x126/0x2f0
[ 154.153360] [<c01a55a0>] ? seq_read+0x0/0x2f0
[ 154.153360] [<c01c033c>] ? proc_reg_read+0x5c/0x90
[ 154.153360] [<c0189919>] ? vfs_read+0x99/0x140
[ 154.153360] [<c01c02e0>] ? proc_reg_read+0x0/0x90
[ 154.153360] [<c0189a7d>] ? sys_read+0x3d/0x70
[ 154.153360] [<c0103c3d>] ? sysenter_do_call+0x12/0x35
[ 154.153360] =======================
[ 154.153360] Code: Bad EIP value.
[ 154.153360] EIP: [<e87af000>] 0xe87af000 SS:ESP 0068:e0505ee4
[ 154.153360] ---[ end trace 23750b6c2862de94 ]---
Signed-off-by: Wilfried Klaebe <linux-kernel@lebenslange-mailadresse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-03 20:57:19 -08:00
..
2008-11-28 14:21:53 -05:00
2008-12-01 13:49:27 -05:00
2008-11-29 20:42:28 -08:00
2008-10-29 15:03:49 -07:00
2008-11-30 16:44:18 -08:00
2008-10-31 00:40:19 -07:00
2008-10-28 17:46:02 +09:00
2008-12-01 08:19:10 -08:00
2008-10-20 13:14:06 +02:00
2008-10-09 13:52:44 -04:00
2008-11-09 16:28:42 -08:00
2008-11-30 10:03:36 -08:00
2008-11-10 15:01:03 -08:00
2008-11-11 13:12:33 -07:00
2008-12-01 19:55:25 -08:00
2008-11-25 21:38:31 +01:00
2008-11-07 08:25:43 -08:00
2008-11-19 18:49:57 -08:00
2008-12-01 19:55:25 -08:00
2008-11-28 15:09:26 +01:00
2008-12-01 19:55:24 -08:00
2008-11-28 15:24:39 +01:00
2008-12-02 20:40:04 +01:00
2008-10-28 00:14:47 -04:00
2008-11-29 17:07:56 +01:00
2008-12-01 10:11:50 -08:00
2008-11-30 11:05:21 -08:00
2008-12-03 20:57:19 -08:00
2008-11-01 09:50:12 -07:00
2008-11-30 10:03:37 -08:00
2008-11-13 23:39:14 +00:00
2008-12-01 18:04:14 -02:00
2008-10-21 07:48:33 -04:00
2008-11-07 08:25:43 -08:00
2008-11-16 19:58:47 +01:00
2008-12-02 15:51:35 -08:00
2008-11-08 21:37:46 +01:00
2008-11-30 11:34:17 -08:00
2008-12-03 00:36:15 -08:00
2008-10-16 11:21:30 -07:00
2008-10-31 16:12:01 +11:00
2008-10-27 19:15:41 +01:00
2008-10-21 07:47:06 -04:00
2008-12-01 19:55:24 -08:00
2008-12-02 15:55:05 -08:00
2008-11-09 21:47:47 +01:00
2008-11-04 08:18:19 -08:00
2008-10-20 09:44:30 -07:00
2008-11-05 19:59:08 +11:00
2008-11-30 10:03:37 -08:00
2008-11-09 14:49:23 +00:00
2008-12-02 15:55:43 -08:00
2008-12-01 10:18:20 -06:00
2008-12-01 07:55:14 -08:00
2008-12-02 15:52:28 -08:00
2008-11-24 11:53:44 +11:00
2008-12-01 19:55:24 -08:00
2008-11-10 13:50:17 -08:00
2008-11-09 12:47:04 -08:00
2008-11-11 09:30:23 -08:00
2008-11-01 09:49:46 -07:00
2008-12-01 08:19:10 -08:00
2008-10-20 14:37:53 +01:00
2008-12-02 20:27:15 +01:00
2008-11-30 10:03:36 -08:00
2008-12-01 15:55:10 +00:00
2008-11-17 19:11:26 +01:00
2008-10-28 21:47:17 +00:00
2008-10-26 16:35:46 -07:00