Skip to content

Commit

Permalink
usb: renesas_usbhs: mod_host: fixup usbhsh_ureq_free() timing
Browse files Browse the repository at this point in the history
usbhsh_ureq_free() free ureq which includes ubshs_pkt.
But current driver used usbhs_pkt after freed ureq.
This patch fixup this bug.
Special thanks to Chen

Reported-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Kuninori Morimoto authored and Felipe Balbi committed Dec 13, 2012
1 parent d9fa298 commit e0b64ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/renesas_usbhs/mod_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,9 +661,10 @@ static void usbhsh_queue_done(struct usbhs_priv *priv, struct usbhs_pkt *pkt)
status = -ESHUTDOWN;

urb->actual_length = pkt->actual;
usbhsh_ureq_free(hpriv, ureq);

usbhsh_endpoint_sequence_save(hpriv, urb, pkt);
usbhsh_ureq_free(hpriv, ureq);

usbhsh_pipe_detach(hpriv, usbhsh_ep_to_uep(urb->ep));

usb_hcd_unlink_urb_from_ep(hcd, urb);
Expand Down

0 comments on commit e0b64ce

Please sign in to comment.