diff options
author | Manu Gautam <mgautam@codeaurora.org> | 2017-12-21 07:24:25 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-02-12 11:55:43 +0300 |
commit | e74bd4d358e5455233f1dcc3975425905b270b91 (patch) | |
tree | 84036466dd272f3e961ce09058b9dc9de736235f /drivers/usb/gadget/udc/core.c | |
parent | c49f63055e252810e5d6c83a4943b18db16b3cd8 (diff) | |
download | linux-e74bd4d358e5455233f1dcc3975425905b270b91.tar.xz |
usb: gadget: core: Fix use-after-free of usb_request
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>
Diffstat (limited to 'drivers/usb/gadget/udc/core.c')
-rw-r--r-- | drivers/usb/gadget/udc/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c index 859d5b11ba4c..1f8b19d9cf97 100644 --- 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); |