From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erik Mouw Subject: [BUG 2.6.17-git] kmem_cache_create: duplicate cache scsi_cmd_cache Date: Thu, 11 May 2006 17:14:57 +0200 Message-ID: <20060511151456.GD3755@harddisk-recovery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from dtp.xs4all.nl ([80.126.206.180]:15188 "HELO abra2.bitwizard.nl") by vger.kernel.org with SMTP id S1030220AbWEKPO7 (ORCPT ); Thu, 11 May 2006 11:14:59 -0400 Received: from erik by zurix.bitwizard.nl with local (Exim 3.36 #1 (Debian)) id 1FeCsT-0002Yv-00 for ; Thu, 11 May 2006 17:14:57 +0200 Content-Disposition: inline Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: linux-scsi@vger.kernel.org Hi, While playing with libata in 2.6.17-git from today, I got this bug: SCSI subsystem initialized libata version 1.20 loaded. sata_promise 0000:02:05.0: version 1.04 kmem_cache_create: duplicate cache scsi_cmd_cache kmem_cache_create+0x331/0x390 scsi_setup_command_freelist+0x71/0xf0 [scsi_mod] scsi_host_alloc+0x17e/0x270 [scsi_mod] ata_host_add+0x41/0xc0 [libata] __kzalloc+0x1f/0x50 ata_device_add+0xb0/0x240 [libata] pdc_ata_init_one+0x27f/0x330 [sata_promise] pci_call_probe+0x19/0x20 __pci_device_probe+0x5e/0x70 pci_device_probe+0x2f/0x50 driver_probe_device+0xb7/0xe0 klist_dec_and_del+0x1a/0x20 __driver_attach+0x0/0x90 __driver_attach+0x71/0x90 bus_for_each_dev+0x69/0x80 driver_attach+0x26/0x30 __driver_attach+0x0/0x90 bus_add_driver+0x83/0xc0 __pci_register_driver+0x4d/0x70 pdc_ata_init+0x17/0x1b [sata_promise] sys_init_module+0x120/0x1b0 syscall_call+0x7/0xb How to recreate: - fully modular scsi and libata - modprobe sata_promise ; modprobe sd_mod - rmmod sd_mod ; rmmod sata_promise ; rmmod libata ; rmmod scsi_mod - modprobe sata_promise At first glance Looks to me like scsi_mod forgot to delete the scsi_cmd_cache at module unload. Note that I can only trigger the bug when there are devices connected to the SATA controller. It doesn't look libata related, cause I can also trigger it using the sym53c8xx driver: SCSI subsystem initialized sym0: <895> rev 0x1 at pci 0000:02:06.0 irq 17 kmem_cache_create: duplicate cache scsi_cmd_cache kmem_cache_create+0x331/0x390 scsi_setup_command_freelist+0x71/0xf0 [scsi_mod] scsi_host_alloc+0x17e/0x270 [scsi_mod] printk+0x17/0x20 sym_attach+0x75/0x3d0 [sym53c8xx] sym2_probe+0xc9/0x130 [sym53c8xx] pci_call_probe+0x19/0x20 __pci_device_probe+0x5e/0x70 pci_device_probe+0x2f/0x50 driver_probe_device+0xb7/0xe0 klist_dec_and_del+0x1a/0x20 __driver_attach+0x0/0x90 __driver_attach+0x71/0x90 bus_for_each_dev+0x69/0x80 driver_attach+0x26/0x30 __driver_attach+0x0/0x90 bus_add_driver+0x83/0xc0 __pci_register_driver+0x4d/0x70 sym2_init+0x3a/0x5b [sym53c8xx] sys_init_module+0x120/0x1b0 syscall_call+0x7/0xb Erik -- +-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 -- | Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands