• Li Jun's avatar
    usb: gadget: composite: dequeue cdev->req before free its buffer · be0a8887
    Li Jun authored
    commit f2267089(usb: gadget: composite: dequeue cdev->req before free it in
    composite_dev_cleanup) fixed a bug: free the usb request(i.e. cdev->req) but
    does not dequeue it beforehand. This fix is not proper enough because it
    dequeues the request after free its data buffer, considering the hardware can
    access the buffer's memory anytime before the request's complettion rountine
    runs, and usb_ep_dequeue always call the complettion rountine before it returns,
    so the best way is to dequeue the request before free its buffer.
    Suggested-by: default avatarFelipe Balbi <balbi@ti.com>
    Signed-off-by: default avatarLi Jun <b47624@freescale.com>
    Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
    be0a8887
composite.c 58.5 KB