于 2012年12月17日 09:37, Chen Gang 写道:
> 于 2012年12月16日 01:04, Alan Stern 写道:
>> Also, don't forget that the first think usb_hcd_giveback_urb does is 
>> set urb->hcpriv to NULL.
>>
> 
>   in finish_urb:
>     when call usb_hcd_giveback_urb, need unlock firstly (lock again, after 
> finish).
>     kfree urb->hcpriv in lock protected, but set it NULL out of lock 
> protected.
>       (at least, it seems not a good idea)
>       (since we already agree to sending a patch, it is not necessary to 
> reply).
> 

  oh, sorry, I forgot 2 things:

    I originally said "not find set urb->hcpriv to NULL within finish_urb".
    it is incorrect (as your reply: usb_hcd_giveback_urb does in finish_urb)
    it is my fault.

    :-)


    are all kfree for urb->hcpriv in lock protected ? 
      (set urb->hcpriv = NULL in usb_hcd_giveback_urb, not in lock protected).
    can you be sure that it is no synchronization issue ?
      if you can be sure
        would you please explain to me (I am learning).
      else
        I will check it in details to make sure whether it can cause issue, or 
not.


  thanks.

-- 
Chen Gang

Asianux Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to