Messages in this thread Patch in this message | | | Date | Mon, 8 Aug 2005 18:55:46 -0400 | From | Dave Jones <> | Subject | icn driver fails to unload when no hardware present. |
| |
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; - 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/
| |