Bug#510859: zaptel: rmmod of zaphfc gives kernel stack trace

2009-01-20 Thread Tristan Hill
Based on the code reference in the warning (referring to
http://lxr.linux.no/linux+v2.6.26/arch/x86/kernel/smp.c#L207) I believe
its due to using the interrupt disabling spinlock functions.

I have not have the system deadlock as indicated by comments in the code
near the above link and the code seems to have changed/moved a lot in
newer kernels so don't know how much a problem it is.

The warning/stack trace goes away with the attached patch.  I assume its
safe to not disable interrupts once the handler has been unregistered.

Thanks
Tristan
=== modified file 'kernel/zaphfc/zaphfc.c'
--- kernel/zaphfc/zaphfc.c	2009-01-20 19:44:57 +
+++ kernel/zaphfc/zaphfc.c	2009-01-20 19:47:46 +
@@ -109,7 +109,7 @@
 spin_unlock_irqrestore(hfctmp-lock, flags);
 set_current_state(TASK_UNINTERRUPTIBLE);
 schedule_timeout((30 * HZ) / 1000);	// wait 30 ms
-spin_lock_irqsave(hfctmp-lock,flags);
+spin_lock(hfctmp-lock);
 
 hfc_outb(hfctmp,hfc_CIRM,0);	// softreset off
 
@@ -123,7 +123,7 @@
 if (hfctmp-pcidev != NULL) {
 pci_disable_device(hfctmp-pcidev);
 }
-spin_unlock_irqrestore(hfctmp-lock,flags);
+spin_unlock(hfctmp-lock);
 if (hfctmp-ztdev != NULL) {
 	zt_unregister(hfctmp-ztdev-span);
 	vfree(hfctmp-ztdev);



Bug#510859: zaptel: rmmod of zaphfc gives kernel stack trace

2009-01-05 Thread Tzafrir Cohen
On Mon, Jan 05, 2009 at 01:45:48PM +, s...@saticed.me.uk wrote:
 Package: zaptel
 Version: 1:1.4.11~dfsg-3
 Severity: normal

Has this happened once, or is it a reproducable issue? 

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#510859: zaptel: rmmod of zaphfc gives kernel stack trace

2009-01-05 Thread Tristan Hill
On Mon, 2009-01-05 at 16:23 +0200, Tzafrir Cohen wrote:
 On Mon, Jan 05, 2009 at 01:45:48PM +, s...@saticed.me.uk wrote:
  Package: zaptel
  Version: 1:1.4.11~dfsg-3
  Severity: normal
 
 Has this happened once, or is it a reproducable issue? 


occurs every rmmod so far




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#510859: zaptel: rmmod of zaphfc gives kernel stack trace

2009-01-05 Thread stan
Package: zaptel
Version: 1:1.4.11~dfsg-3
Severity: normal

rmmod of zaphfc gives:

Jan  5 12:26:13 tiber kernel: [184286.468286] zaphfc: stop
Jan  5 12:26:13 tiber kernel: [184286.468286] zaphfc: shutting down card at 
e0a6.
Jan  5 12:26:13 tiber kernel: [184286.496037] [ cut here 
]
Jan  5 12:26:13 tiber kernel: [184286.496060] WARNING: at 
arch/x86/kernel/smp.c:207 
native_smp_call_function_mask+0x2b/0x123()
Jan  5 12:26:13 tiber kernel: [184286.496091] Modules linked in: tun ipt_REJECT 
nf_nat_ftp nf_conntrack_ftp xt_state 
xt_tcpudp iptable_mangle iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack 
iptable_filter ip_tables x_tables ipv6 
dm_snapshot dm_mirror dm_log dm_mod zaphfc(-) zaptel crc_ccitt oslec 
ide_generic snd_mpu401 snd_cs4232 snd_opl3_lib 
snd_hwdep snd_cs4231_lib parport_pc parport ns558 gameport snd_mpu401_uart 
snd_rawmidi snd_seq_device serio_raw psmouse 
snd_pcsp snd_intel8x0 snd_ac97_codec shpchp pci_hotplug ac97_bus snd_pcm 
snd_timer snd soundcore snd_page_alloc button 
i2c_nforce2 i2c_core nvidia_agp agpgart evdev ext3 jbd mbcache ide_cd_mod cdrom 
ata_generic sd_mod amd74xx floppy sata_sil 
3c59x mii libata scsi_mod dock ohci1394 ieee1394 ide_pci_generic ide_core 
forcedeth ehci_hcd ohci_hcd usbcore thermal 
processor fan thermal_sys raid1 md_mod
Jan  5 12:26:13 tiber kernel: [184286.496451] Pid: 24979, comm: rmmod Not 
tainted 2.6.26-1-686 #1
Jan  5 12:26:13 tiber kernel: [184286.496476]  [c012256f] 
warn_on_slowpath+0x40/0x66
Jan  5 12:26:13 tiber kernel: [184286.496512]  [c01344c2] 
ktime_get_ts+0x22/0x49
Jan  5 12:26:13 tiber kernel: [184286.496535]  [c01344f6] ktime_get+0xd/0x21
Jan  5 12:26:13 tiber kernel: [184286.496556]  [c01190e6] 
hrtick_start_fair+0xeb/0x12c
Jan  5 12:26:13 tiber kernel: [184286.496583]  [c01f35f7] 
vgacon_scroll+0x184/0x19f
Jan  5 12:26:13 tiber kernel: [184286.496612]  [c0134ee5] 
atomic_notifier_call_chain+0x9/0xc
Jan  5 12:26:13 tiber kernel: [184286.496639]  [c0119d2e] 
dequeue_entity+0x13/0x9b
Jan  5 12:26:13 tiber kernel: [184286.496661]  [c0119c1f] 
__dequeue_entity+0x1f/0x71
Jan  5 12:26:13 tiber kernel: [184286.496685]  [c010296e] 
__switch_to+0xa5/0x125
Jan  5 12:26:13 tiber kernel: [184286.496707]  [c011d3bd] hrtick_set+0x7a/0xd8
Jan  5 12:26:13 tiber kernel: [184286.496730]  [c010ef31] 
native_smp_call_function_mask+0x2b/0x123
Jan  5 12:26:13 tiber kernel: [184286.496756]  [c024cd12] 
pci_conf1_write+0x99/0xa7
Jan  5 12:26:13 tiber kernel: [184286.496782]  [c010f476] 
do_flush_tlb_all+0x0/0x3c
Jan  5 12:26:13 tiber kernel: [184286.496804]  [c010f476] 
do_flush_tlb_all+0x0/0x3c
Jan  5 12:26:13 tiber kernel: [184286.496826]  [c010f73b] 
smp_call_function+0x16/0x1b
Jan  5 12:26:13 tiber kernel: [184286.496849]  [c0126422] 
on_each_cpu+0x10/0x31
Jan  5 12:26:13 tiber kernel: [184286.496872]  [c010f4c5] 
flush_tlb_all+0x13/0x15
Jan  5 12:26:13 tiber kernel: [184286.496893]  [c0169437] 
remove_vm_area+0x2f/0x4b
Jan  5 12:26:13 tiber kernel: [184286.496917]  [c0115f7f] iounmap+0x86/0xa0
Jan  5 12:26:13 tiber kernel: [184286.496940]  [e0a5729e] 
hfc_shutdownCard2+0x76/0xb7 [zaphfc]
Jan  5 12:26:13 tiber kernel: [184286.496968]  [e0a57333] 
cleanup_module+0x2c/0x58 [zaphfc]
Jan  5 12:26:13 tiber kernel: [184286.496991]  [c013fd0a] 
sys_delete_module+0x194/0x1de
Jan  5 12:26:13 tiber kernel: [184286.497018]  [c01657ad] remove_vma+0x3e/0x43
Jan  5 12:26:13 tiber kernel: [184286.497043]  [c0166124] 
do_munmap+0x181/0x19b
Jan  5 12:26:13 tiber kernel: [184286.497071]  [c0103853] 
sysenter_past_esp+0x78/0xb1
Jan  5 12:26:13 tiber kernel: [184286.497103]  ===
Jan  5 12:26:13 tiber kernel: [184286.497119] ---[ end trace 2cc0f1e276002873 
]---
Jan  5 12:26:13 tiber kernel: [184286.497147] ACPI: PCI interrupt for device 
:01:07.0 disabled
Jan  5 12:26:13 tiber kernel: [184286.497259] unregistered from zaptel.
Jan  5 12:26:13 tiber kernel: [184286.497277] zaphfc: freed one card.

System appears to still operate normally however.

zaphfc module was built with m-a.

-- System Information:
Debian Release: 5.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages zaptel depends on:
ii  fxload  0.0.20020411-1.1 Firmware download to EZ-USB device
ii  libc6   2.7-16   GNU C Library: Shared libraries
ii  libnewt0.52 0.52.2-11.3  Not Erik's Windowing Toolkit - tex
ii  libtonezone11:1.4.11~dfsg-3  tonezone library (runtime)
ii  libusb-0.1-42:0.1.12-13  userspace USB programming library
ii  procps  1:3.2.7-9/proc file system utilities

zaptel recommends no packages.

zaptel suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe.