>There is a asynchronous unlink (a call to  uhci_unlink_urb_async) of the urb
>after the completion, so it should be freed. Can you add some debugging to
>uhci_clean_iso_step1/2 to verify this with oyur code?

Already did some testing but i'm not clear about the logic so didn't 
success to fix it.
Here what i found :
1) In  process_interrupt  line 2514 :
     called uhci_unlink_urb_async
        here : (line 1136)
         if (mode==UNLINK_ASYNC_STORE_URB)
                         list_add_tail (&urb->urb_list, &s->urb_unlinked); 
// store urb
           urb stored in urb_unlinked list.
2) in function process_urb line 2635 :

         Urb disappear from urb_unlinked list
3)  In isr uhci_interrupt  line 2798  called uhci_cleanup_unlink
      that for my understanding should free the lost td but since  in (2) 
urb was removed from
      unlinked list uhci_cleanup_unlink  exits immediately :
      line 1240
      while (q != &s->urb_unlinked) {
      ....

I didn't find the correct way to avoid this behavior.
I try to ignore the call from (2) something like :
if (usb_pipetype (urb->pipe) != PIPE_INTERRUPT && !urb->interval)
          dequeue_urb (s, urb);
but this lead to crash somewhere in uhci_cleanup_unlink since
urb private was freed  in process_urb line 2642.

I did a lot of testings since i was thinking that problem in my side ( i'm 
porting stack to
nt) but after long testing on nt i checked in linux and find that the 
problem exist on linux too .

Regards Ilya.




At 11:27 AM 6/3/2002 +0200, Georg Acher wrote:
>On Mon, Jun 03, 2002 at 11:15:02AM +0200, Ilya Lifshits wrote:
> > Hello all,
> >
> > Linux duran 2.4.18 #6 SMP Sun Jun 2 02:29:13 IDT 2002 i686 unknown
> >
> > I experienced a memory leak due one shot interrupt transfer. I search the
> > web and find that there is
> > 
> 
>http://www.kernel.org/pub/linux/kernel/people/gregkh/usb/2.4/usb-usb-uhci-2.4.18-pre6.patch
> 
>
> > that should
> > fix this leak. So i downloaded 2.4.18 kernel and seems to me that there is
>
>No, this patch was for synchronous unlinks.
>
> > still leak here ( i tested
> > same code with uhci and there is no leak)
> > I'm doing something wrong or leak still here ?
>
>There is a asynchronous unlink (a call to  uhci_unlink_urb_async) of the urb
>after the completion, so it should be freed. Can you add some debugging to
>uhci_clean_iso_step1/2 to verify this with oyur code?
>
> > Below test code and explanation.
>
>A quick inspection showed no obvious problems in your code...
>--
>          Georg Acher, [EMAIL PROTECTED]
>          http://www.in.tum.de/~acher/
>           "Oh no, not again !" The bowl of petunias
>
>_______________________________________________________________
>
>Don't miss the 2002 Sprint PCS Application Developer's Conference
>August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
>
>_______________________________________________
>[EMAIL PROTECTED]
>To unsubscribe, use the last form field at:
>https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to