* icn driver fails to unload when no hardware present.
@ 2005-08-08 22:55 Dave Jones
0 siblings, 0 replies; only message in thread
From: Dave Jones @ 2005-08-08 22:55 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linux Kernel
Fix a null dereference in module unload path.
Found by a simple modprobe icn ; rmmod icn
Signed-off-by: Dave Jones <davej@redhat.com>
--- linux-2.6.12/drivers/isdn/icn/icn.c~ 2005-08-08 18:50:25.000000000 -0400
+++ linux-2.6.12/drivers/isdn/icn/icn.c 2005-08-08 18:54:13.000000000 -0400
@@ -1650,7 +1650,7 @@ static void __exit icn_exit(void)
{
isdn_ctrl cmd;
icn_card *card = cards;
- icn_card *last;
+ icn_card *last, *tmpcard;
int i;
unsigned long flags;
@@ -1670,8 +1670,9 @@ static void __exit icn_exit(void)
for (i = 0; i < ICN_BCH; i++)
icn_free_queue(card, i);
}
- card = card->next;
+ tmpcard = card->next;
spin_unlock_irqrestore(&card->lock, flags);
+ card = tmpcard;
}
card = cards;
cards = NULL;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-08-08 22:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-08 22:55 icn driver fails to unload when no hardware present Dave Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox