lkml.org 
[lkml]   [1998]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
To: David.Woodhouse@mvhi.com, linux-kernel@vger.rutgers.edu
Subject: Re: [PATCH] ad1848 doesn't correctly free IRQ on unloading --> oops.
X-Newsreader: TIN [version 1.2 PL1]

DW> ad1848 registers the irq with devc->dev_no as the 'instance data' or whatever
DW> it's called. Later it tries to free it, just passing NULL.

DW> The result is that the IRQ isn't unregistered when the driver unloads, causing
DW> an oops if you later read /proc/interrupts.
There is much better way to do it, with your path we will loose one slot
in adev_info each time.
I have a couple of similar patches to another drivers, sent to Alan, but
they are not applied or applied partialy for some unknown reason.

Patch against 2.1.125, but must apply cleanly against 2.1.126

--- linux-2.1.125/drivers/sound1/ad1848.c Mon Oct 12 13:09:15 1998
+++ linux-2.1.125/drivers/sound/ad1848.c Mon Oct 12 15:17:09 1998
@@ -1945,6 +1945,10 @@
mixer = audio_devs[devc->dev_no]->mixer_dev;
if(mixer>=0)
sound_unload_mixerdev(mixer);
+
+ nr_ad1848_devs--;
+ for ( ; i < nr_ad1848_devs ; i++)
+ adev_info[i] = adev_info[i+1];
}
else
printk(KERN_ERR "ad1848: Can't find device to be unloaded. Base=%x\n", io_base);

Bye,
Oleg
--
[RAVE *SUCKS* TEAM] [Team $Ui(iDE] [Trans-M Must Die!] [Sepultura Fans Team]
[Tolkien forever team]

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.062 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site