From: Manu Gautam <mgautam@codeaurora.org>
To: Felipe Balbi <balbi@kernel.org>
Cc: linux-usb@vger.kernel.org
Subject: usb: gadget: core: Fix use-after-free of usb_request
Date: Wed, 31 Jan 2018 10:55:18 +0530 [thread overview]
Message-ID: <f6617fdf-d4a1-db2f-6886-724f2563a868@codeaurora.org> (raw)
Hi Felipe,
On 12/21/2017 9:54 AM, Manu Gautam wrote:
> Driver is tracing usb_request after freeing it.
> Fix it by changing the order.
Let me know if following change looks ok?
>
> Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
> ---
> drivers/usb/gadget/udc/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c
> index d41d07a..ab0a075 100644
> --- a/drivers/usb/gadget/udc/core.c
> +++ b/drivers/usb/gadget/udc/core.c
> @@ -191,8 +191,8 @@ struct usb_request *usb_ep_alloc_request(struct usb_ep *ep,
> 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);
>
next reply other threads:[~2018-01-31 5:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-31 5:25 Manu Gautam [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-12-21 4:24 usb: gadget: core: Fix use-after-free of usb_request Manu Gautam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f6617fdf-d4a1-db2f-6886-724f2563a868@codeaurora.org \
--to=mgautam@codeaurora.org \
--cc=balbi@kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).