projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c49f630
)
usb: gadget: core: Fix use-after-free of usb_request
author
Manu Gautam
<mgautam@codeaurora.org>
Thu, 21 Dec 2017 04:24:25 +0000
(09:54 +0530)
committer
Felipe Balbi
<felipe.balbi@linux.intel.com>
Mon, 12 Feb 2018 08:55:43 +0000
(10:55 +0200)
Driver is tracing usb_request after freeing it.
Fix it by changing the order.
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/core.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/udc/core.c
b/drivers/usb/gadget/udc/core.c
index 859d5b11ba4c45353ce4174b1e0436db67189b90..1f8b19d9cf97bdd2224102a3e2a1684460c6a46f 100644
(file)
--- a/
drivers/usb/gadget/udc/core.c
+++ b/
drivers/usb/gadget/udc/core.c
@@
-180,8
+180,8
@@
EXPORT_SYMBOL_GPL(usb_ep_alloc_request);
void usb_ep_free_request(struct usb_ep *ep,
struct usb_request *req)
{
- ep->ops->free_request(ep, req);
trace_usb_ep_free_request(ep, req, 0);
+ ep->ops->free_request(ep, req);
}
EXPORT_SYMBOL_GPL(usb_ep_free_request);