Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757379Ab0KPTNP (ORCPT ); Tue, 16 Nov 2010 14:13:15 -0500 Received: from mail-out.m-online.net ([212.18.0.10]:58430 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755374Ab0KPTNM (ORCPT ); Tue, 16 Nov 2010 14:13:12 -0500 X-Auth-Info: 2TS9iGpyETqW2A6UVon1QUIyygVDbCjfIsiLTJOzHPg= To: linux-scsi@vger.kernel.org cc: Matthew Wilcox , linux-kernel@vger.kernel.org Subject: Unloading sym53c8xx driver causes ___free_dma_mem_cluster warnings From: Wolfgang Denk MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Date: Tue, 16 Nov 2010 20:13:09 +0100 Message-Id: <20101116191309.DD04C14E644@gemini.denx.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 14699 Lines: 204 Hi, when unloading the sym53c8xx driver a number of kernel warning messages are printed: [511902.538283] sym0: detaching ... [511902.538286] sym0: resetting chip [511902.538319] ------------[ cut here ]------------ [511902.538326] WARNING: at /builddir/build/BUILD/kernel-2.6.35.fc14/linux-2.6.35.i686/arch/x86/include/asm/dma-mapping.h:155 ___free_dma_mem_cluster+0x45/0xc7 [sym53c8xx]() [511902.538330] Hardware name: EP35C-DS3R [511902.538332] Modules linked in: sym53c8xx(-) osst ch nfs fscache fuse ebtable_nat ebtables bridge stp llc nfsd lockd nfs_acl auth_rpcgss it87 hwmon_vid coretemp tun sunrpc cpufreq_ondemand acpi_cpufreq mperf ipv6 kqemu kvm_intel kvm uinput snd_hda_codec_realtek nvidia(P) snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device ppdev snd_pcm snd_timer snd parport_pc iTCO_wdt iTCO_vendor_support i2c_i801 parport r8169 mii i2c_core soundcore pl2303 usbserial snd_page_alloc microcode xfs exportfs raid456 async_raid6_recov async_pq raid6_pq async_xor xor async_memcpy async_tx pata_acpi ata_generic pata_jmicron scsi_transport_spi [last unloaded: st] [511902.538377] Pid: 4582, comm: rmmod Tainted: P W 2.6.35.6-48.fc14.i686.PAE #1 [511902.538377] Call Trace: [511902.538377] [] warn_slowpath_common+0x6a/0x7f [511902.538377] [] ? ___free_dma_mem_cluster+0x45/0xc7 [sym53c8xx] [511902.538377] [] warn_slowpath_null+0x14/0x18 [511902.538377] [] ___free_dma_mem_cluster+0x45/0xc7 [sym53c8xx] [511902.538377] [] __sym_mfree+0x5c/0xa2 [sym53c8xx] [511902.538377] [] ? __raw_local_irq_save+0x19/0x1e [511902.538377] [] __sym_mfree_dma+0x3c/0x5d [sym53c8xx] [511902.538377] [] sym_hcb_free+0x72/0x185 [sym53c8xx] [511902.538377] [] sym_free_resources+0x4c/0x6b [sym53c8xx] [511902.538377] [] sym_detach+0x8e/0xa2 [sym53c8xx] [511902.538377] [] sym2_remove+0x24/0x3c [sym53c8xx] [511902.538377] [] pci_device_remove+0x1e/0x3e [511902.538377] [] __device_release_driver+0x62/0xa4 [511902.538377] [] driver_detach+0x62/0x82 [511902.538377] [] bus_remove_driver+0x8d/0xc7 [511902.538377] [] driver_unregister+0x50/0x57 [511902.538377] [] pci_unregister_driver+0x32/0x67 [511902.538377] [] ? cpumask_next+0x17/0x19 [511902.538377] [] sym2_exit+0x12/0x87 [sym53c8xx] [511902.538377] [] sys_delete_module+0x181/0x1de [511902.538377] [] ? do_page_fault+0x219/0x275 [511902.538377] [] ? do_page_fault+0x247/0x275 [511902.538377] [] ? audit_syscall_entry+0x116/0x138 [511902.538377] [] sysenter_do_call+0x12/0x28 [511902.538377] ---[ end trace 23e07d0c130b5514 ]--- [511902.538521] ------------[ cut here ]------------ [511902.538527] WARNING: at /builddir/build/BUILD/kernel-2.6.35.fc14/linux-2.6.35.i686/arch/x86/include/asm/dma-mapping.h:155 ___free_dma_mem_cluster+0x45/0xc7 [sym53c8xx]() [511902.538531] Hardware name: EP35C-DS3R [511902.538532] Modules linked in: sym53c8xx(-) osst ch nfs fscache fuse ebtable_nat ebtables bridge stp llc nfsd lockd nfs_acl auth_rpcgss it87 hwmon_vid coretemp tun sunrpc cpufreq_ondemand acpi_cpufreq mperf ipv6 kqemu kvm_intel kvm uinput snd_hda_codec_realtek nvidia(P) snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device ppdev snd_pcm snd_timer snd parport_pc iTCO_wdt iTCO_vendor_support i2c_i801 parport r8169 mii i2c_core soundcore pl2303 usbserial snd_page_alloc microcode xfs exportfs raid456 async_raid6_recov async_pq raid6_pq async_xor xor async_memcpy async_tx pata_acpi ata_generic pata_jmicron scsi_transport_spi [last unloaded: st] [511902.538583] Pid: 4582, comm: rmmod Tainted: P W 2.6.35.6-48.fc14.i686.PAE #1 [511902.538585] Call Trace: [511902.538589] [] warn_slowpath_common+0x6a/0x7f [511902.538595] [] ? ___free_dma_mem_cluster+0x45/0xc7 [sym53c8xx] [511902.538599] [] warn_slowpath_null+0x14/0x18 [511902.538604] [] ___free_dma_mem_cluster+0x45/0xc7 [sym53c8xx] [511902.538610] [] __sym_mfree+0x5c/0xa2 [sym53c8xx] [511902.538614] [] ? __raw_local_irq_save+0x19/0x1e [511902.538619] [] __sym_mfree_dma+0x3c/0x5d [sym53c8xx] [511902.538625] [] sym_hcb_free+0x92/0x185 [sym53c8xx] [511902.538630] [] sym_free_resources+0x4c/0x6b [sym53c8xx] [511902.538635] [] sym_detach+0x8e/0xa2 [sym53c8xx] [511902.538640] [] sym2_remove+0x24/0x3c [sym53c8xx] [511902.538643] [] pci_device_remove+0x1e/0x3e [511902.538647] [] __device_release_driver+0x62/0xa4 [511902.538650] [] driver_detach+0x62/0x82 [511902.538654] [] bus_remove_driver+0x8d/0xc7 [511902.538657] [] driver_unregister+0x50/0x57 [511902.538660] [] pci_unregister_driver+0x32/0x67 [511902.538664] [] ? cpumask_next+0x17/0x19 [511902.538669] [] sym2_exit+0x12/0x87 [sym53c8xx] [511902.538673] [] sys_delete_module+0x181/0x1de [511902.538677] [] ? do_page_fault+0x219/0x275 [511902.538680] [] ? do_page_fault+0x247/0x275 [511902.538684] [] ? audit_syscall_entry+0x116/0x138 [511902.538688] [] sysenter_do_call+0x12/0x28 [511902.538690] ---[ end trace 23e07d0c130b5515 ]--- [511902.538693] ------------[ cut here ]------------ [511902.538698] WARNING: at /builddir/build/BUILD/kernel-2.6.35.fc14/linux-2.6.35.i686/arch/x86/include/asm/dma-mapping.h:155 ___free_dma_mem_cluster+0x45/0xc7 [sym53c8xx]() [511902.538702] Hardware name: EP35C-DS3R [511902.538703] Modules linked in: sym53c8xx(-) osst ch nfs fscache fuse ebtable_nat ebtables bridge stp llc nfsd lockd nfs_acl auth_rpcgss it87 hwmon_vid coretemp tun sunrpc cpufreq_ondemand acpi_cpufreq mperf ipv6 kqemu kvm_intel kvm uinput snd_hda_codec_realtek nvidia(P) snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device ppdev snd_pcm snd_timer snd parport_pc iTCO_wdt iTCO_vendor_support i2c_i801 parport r8169 mii i2c_core soundcore pl2303 usbserial snd_page_alloc microcode xfs exportfs raid456 async_raid6_recov async_pq raid6_pq async_xor xor async_memcpy async_tx pata_acpi ata_generic pata_jmicron scsi_transport_spi [last unloaded: st] [511902.538754] Pid: 4582, comm: rmmod Tainted: P W 2.6.35.6-48.fc14.i686.PAE #1 [511902.538756] Call Trace: [511902.538760] [] warn_slowpath_common+0x6a/0x7f [511902.538765] [] ? ___free_dma_mem_cluster+0x45/0xc7 [sym53c8xx] [511902.538769] [] warn_slowpath_null+0x14/0x18 [511902.538775] [] ___free_dma_mem_cluster+0x45/0xc7 [sym53c8xx] [511902.538781] [] __sym_mfree+0x5c/0xa2 [sym53c8xx] [511902.538784] [] ? __raw_local_irq_save+0x19/0x1e [511902.538790] [] __sym_mfree_dma+0x3c/0x5d [sym53c8xx] [511902.538795] [] sym_hcb_free+0xb2/0x185 [sym53c8xx] [511902.538800] [] sym_free_resources+0x4c/0x6b [sym53c8xx] [511902.538805] [] sym_detach+0x8e/0xa2 [sym53c8xx] [511902.538810] [] sym2_remove+0x24/0x3c [sym53c8xx] [511902.538814] [] pci_device_remove+0x1e/0x3e [511902.538817] [] __device_release_driver+0x62/0xa4 [511902.538821] [] driver_detach+0x62/0x82 [511902.538824] [] bus_remove_driver+0x8d/0xc7 [511902.538827] [] driver_unregister+0x50/0x57 [511902.538831] [] pci_unregister_driver+0x32/0x67 [511902.538834] [] ? cpumask_next+0x17/0x19 [511902.538839] [] sym2_exit+0x12/0x87 [sym53c8xx] [511902.538843] [] sys_delete_module+0x181/0x1de [511902.538847] [] ? do_page_fault+0x219/0x275 [511902.538850] [] ? do_page_fault+0x247/0x275 [511902.538854] [] ? audit_syscall_entry+0x116/0x138 [511902.538858] [] sysenter_do_call+0x12/0x28 [511902.538861] ---[ end trace 23e07d0c130b5516 ]--- [511902.538864] ------------[ cut here ]------------ [511902.538870] WARNING: at /builddir/build/BUILD/kernel-2.6.35.fc14/linux-2.6.35.i686/arch/x86/include/asm/dma-mapping.h:155 ___free_dma_mem_cluster+0x45/0xc7 [sym53c8xx]() [511902.538873] Hardware name: EP35C-DS3R [511902.538875] Modules linked in: sym53c8xx(-) osst ch nfs fscache fuse ebtable_nat ebtables bridge stp llc nfsd lockd nfs_acl auth_rpcgss it87 hwmon_vid coretemp tun sunrpc cpufreq_ondemand acpi_cpufreq mperf ipv6 kqemu kvm_intel kvm uinput snd_hda_codec_realtek nvidia(P) snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device ppdev snd_pcm snd_timer snd parport_pc iTCO_wdt iTCO_vendor_support i2c_i801 parport r8169 mii i2c_core soundcore pl2303 usbserial snd_page_alloc microcode xfs exportfs raid456 async_raid6_recov async_pq raid6_pq async_xor xor async_memcpy async_tx pata_acpi ata_generic pata_jmicron scsi_transport_spi [last unloaded: st] [511902.538925] Pid: 4582, comm: rmmod Tainted: P W 2.6.35.6-48.fc14.i686.PAE #1 [511902.538928] Call Trace: [511902.538931] [] warn_slowpath_common+0x6a/0x7f [511902.538937] [] ? ___free_dma_mem_cluster+0x45/0xc7 [sym53c8xx] [511902.538941] [] warn_slowpath_null+0x14/0x18 [511902.538947] [] ___free_dma_mem_cluster+0x45/0xc7 [sym53c8xx] [511902.538952] [] __sym_mfree+0x5c/0xa2 [sym53c8xx] [511902.538958] [] __sym_mfree_dma+0x3c/0x5d [sym53c8xx] [511902.538964] [] sym_hcb_free+0x149/0x185 [sym53c8xx] [511902.538969] [] sym_free_resources+0x4c/0x6b [sym53c8xx] [511902.538974] [] sym_detach+0x8e/0xa2 [sym53c8xx] [511902.538979] [] sym2_remove+0x24/0x3c [sym53c8xx] [511902.538982] [] pci_device_remove+0x1e/0x3e [511902.538986] [] __device_release_driver+0x62/0xa4 [511902.538989] [] driver_detach+0x62/0x82 [511902.538992] [] bus_remove_driver+0x8d/0xc7 [511902.538996] [] driver_unregister+0x50/0x57 [511902.538999] [] pci_unregister_driver+0x32/0x67 [511902.539002] [] ? cpumask_next+0x17/0x19 [511902.539008] [] sym2_exit+0x12/0x87 [sym53c8xx] [511902.539011] [] sys_delete_module+0x181/0x1de [511902.539015] [] ? do_page_fault+0x219/0x275 [511902.539019] [] ? do_page_fault+0x247/0x275 [511902.539022] [] ? audit_syscall_entry+0x116/0x138 [511902.539026] [] sysenter_do_call+0x12/0x28 [511902.539029] ---[ end trace 23e07d0c130b5517 ]--- [511902.539032] ------------[ cut here ]------------ [511902.539038] WARNING: at /builddir/build/BUILD/kernel-2.6.35.fc14/linux-2.6.35.i686/arch/x86/include/asm/dma-mapping.h:155 ___free_dma_mem_cluster+0x45/0xc7 [sym53c8xx]() [511902.539041] Hardware name: EP35C-DS3R [511902.539043] Modules linked in: sym53c8xx(-) osst ch nfs fscache fuse ebtable_nat ebtables bridge stp llc nfsd lockd nfs_acl auth_rpcgss it87 hwmon_vid coretemp tun sunrpc cpufreq_ondemand acpi_cpufreq mperf ipv6 kqemu kvm_intel kvm uinput snd_hda_codec_realtek nvidia(P) snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device ppdev snd_pcm snd_timer snd parport_pc iTCO_wdt iTCO_vendor_support i2c_i801 parport r8169 mii i2c_core soundcore pl2303 usbserial snd_page_alloc microcode xfs exportfs raid456 async_raid6_recov async_pq raid6_pq async_xor xor async_memcpy async_tx pata_acpi ata_generic pata_jmicron scsi_transport_spi [last unloaded: st] [511902.539093] Pid: 4582, comm: rmmod Tainted: P W 2.6.35.6-48.fc14.i686.PAE #1 [511902.539095] Call Trace: [511902.539099] [] warn_slowpath_common+0x6a/0x7f [511902.539105] [] ? ___free_dma_mem_cluster+0x45/0xc7 [sym53c8xx] [511902.539109] [] warn_slowpath_null+0x14/0x18 [511902.539114] [] ___free_dma_mem_cluster+0x45/0xc7 [sym53c8xx] [511902.539120] [] __sym_mfree+0x5c/0xa2 [sym53c8xx] [511902.539126] [] __sym_mfree_dma+0x3c/0x5d [sym53c8xx] [511902.539131] [] sym_free_resources+0x63/0x6b [sym53c8xx] [511902.539136] [] sym_detach+0x8e/0xa2 [sym53c8xx] [511902.539141] [] sym2_remove+0x24/0x3c [sym53c8xx] [511902.539144] [] pci_device_remove+0x1e/0x3e [511902.539148] [] __device_release_driver+0x62/0xa4 [511902.539151] [] driver_detach+0x62/0x82 [511902.539154] [] bus_remove_driver+0x8d/0xc7 [511902.539157] [] driver_unregister+0x50/0x57 [511902.539161] [] pci_unregister_driver+0x32/0x67 [511902.539164] [] ? cpumask_next+0x17/0x19 [511902.539170] [] sym2_exit+0x12/0x87 [sym53c8xx] [511902.539173] [] sys_delete_module+0x181/0x1de [511902.539177] [] ? do_page_fault+0x219/0x275 [511902.539181] [] ? do_page_fault+0x247/0x275 [511902.539184] [] ? audit_syscall_entry+0x116/0x138 [511902.539188] [] sysenter_do_call+0x12/0x28 [511902.539191] ---[ end trace 23e07d0c130b5518 ]--- [511902.541664] sym53c8xx 0000:05:00.0: PCI INT A disabled This is a long standing problem - I reported it more than a yar ago as Fedora bug # 534161, see https://bugzilla.redhat.com/show_bug.cgi?id=534161 Recently I receieved the following advice: | Stanislaw Gruszka 2010-10-03 09:37:31 EDT | | I looked at the code (gash, the sym53c8xx_2 is one big mess). | | First in __sym_mfree_dma we take spin_lock_irqsave(&sym53c8xx_lock, | flags) then after some complex logic call dma_free_coherent(). | Since interrupts are disabled WARN_ON(irqs_disabled()) print a | message and call trace. | | I don't know how to solve it. One solution is move | dma_free_coherent after spin_lock_irqrestore in __sys_mfree_dma, | but as told logic is quite complex. Second is remove WARN_ON from | dma_free_coherent. I have no idea why this warning is there - | free_something functions should be callable from any context. | | Anyway this is not fixed mainline. Wolfgang, please report problem | to proper upstream maintainers. If we get upstream solution, we can | put it in fedora then. OK, so I'm posting it here. Thanks in advance. Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de The human mind ordinarily operates at only ten percent of its capacity. The rest is overhead for the operating system. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/