On Thu, Sep 27, 2001 at 08:33:27AM +0200, Nemosoft Unv. wrote:
> Personally, I say the above piece of code is faulty. Refering to a
> pointer after you appearently deleted it, is just very bad programming
> practice.
ACK ;-) And according to our CVS it is lurking around since March 2000.
There are a few similar actions in other portions of the code, but they are
correct (as far I can see...).
> I?d say, fix the usb-uhci file, and do a quick run on all other instances
> of list_del. I think most programmers got it right, or 2.4.10 kernels would
> be coming down all over the planet.
Fix attached. Please apply it.
-- Georg Acher, acher@in.tum.de http://www.in.tum.de/~acher/ "Oh no, not again !" The bowl of petunias--AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="usb-uhci.patch"
--- linux/drivers/usb/usb-uhci.c.org Thu Sep 27 12:12:39 2001 +++ linux/drivers/usb/usb-uhci.c Thu Sep 27 14:06:43 2001 @@ -2528,7 +2528,7 @@ int i; int ret = 0; urb_priv_t *urb_priv = urb->hcpriv; - struct list_head *p = urb_priv->desc_list.next; + struct list_head *p = urb_priv->desc_list.next, *p_tmp; uhci_desc_t *desc = list_entry (urb_priv->desc_list.prev, uhci_desc_t, desc_list); dbg("urb contains iso request"); @@ -2578,8 +2578,9 @@ dbg("process_iso: %i: len:%d %08x status:%x", i, urb->iso_frame_desc[i].actual_length, le32_to_cpu(desc->hw.td.status),urb->iso_frame_desc[i].status); - list_del (p); + p_tmp = p; p = p->next; + list_del (p_tmp); delete_desc (s, desc); }
--AhhlLboLdkugWU4S-- - 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/