[Linux1394-cvslog] rev 805 - trunk
Brought to you by:
aeb,
bencollins
From: SVN U. <dm...@li...> - 2003-02-28 07:11:34
|
Author: dmaas Date: 2003-02-28 02:10:53 -0500 (Fri, 28 Feb 2003) New Revision: 805 Modified: trunk/dv1394.c Log: fix crash on rmmod dv1394 due to access of freed list element Modified: trunk/dv1394.c ============================================================================== --- trunk/dv1394.c (original) +++ trunk/dv1394.c 2003-02-28 02:10:54.000000000 -0500 @@ -2703,7 +2703,7 @@ struct ti_ohci *ohci; struct video_card *video = NULL; unsigned long flags; - struct list_head *lh; + struct list_head *lh, *templh; char buf[32]; int n; @@ -2717,7 +2717,7 @@ /* find the corresponding video_cards */ spin_lock_irqsave(&dv1394_cards_lock, flags); if(!list_empty(&dv1394_cards)) { - list_for_each(lh, &dv1394_cards) { + list_for_each_safe(lh, templh, &dv1394_cards) { video = list_entry(lh, struct video_card, list); if((video->id >> 2) == ohci->id) dv1394_un_init(video); |