From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: Kernel Oops unloading snd_ymfpci, 2.6.24 Date: Thu, 20 Mar 2008 12:47:48 +0100 Message-ID: References: <6b22a6b40803182157p59cb89bai208a96e76b201069@mail.gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (ns1.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 63E0B24626 for ; Thu, 20 Mar 2008 12:47:49 +0100 (CET) In-Reply-To: <6b22a6b40803182157p59cb89bai208a96e76b201069@mail.gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Gerard Neil Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Wed, 19 Mar 2008 15:57:56 +1100, Gerard Neil wrote: > > Hi, > > I'm just upgraded to kernel 2.6.24 and I'm seeing a kernel OOPS every > time I unload the snd_ymfpci module... > > Below is what I see in my log. My naive interpretation of this is that > the system is barfing in the interrupt handler at the time it is > trying to free the interrupt.... so maybe the interrupt hasn't been > disabled properly before the free_irq() call? As I say, it's a naive > interpretation. free_irq should be called before releasing other resources. Does the patch below work? Takashi --- diff -r 3ed43822fab7 sound/pci/ymfpci/ymfpci_main.c --- a/sound/pci/ymfpci/ymfpci_main.c Thu Mar 20 12:30:36 2008 +0100 +++ b/sound/pci/ymfpci/ymfpci_main.c Thu Mar 20 12:53:52 2008 +0100 @@ -2249,6 +2249,8 @@ static int snd_ymfpci_free(struct snd_ym #ifdef CONFIG_PM vfree(chip->saved_regs); #endif + if (chip->irq >= 0) + free_irq(chip->irq, chip); release_and_free_resource(chip->mpu_res); release_and_free_resource(chip->fm_res); snd_ymfpci_free_gameport(chip); @@ -2257,8 +2259,6 @@ static int snd_ymfpci_free(struct snd_ym if (chip->work_ptr.area) snd_dma_free_pages(&chip->work_ptr); - if (chip->irq >= 0) - free_irq(chip->irq, chip); release_and_free_resource(chip->res_reg_area); pci_write_config_word(chip->pci, 0x40, chip->old_legacy_ctrl);