usb: gadget: core: Fix use-after-free of usb_request
authorManu Gautam <mgautam@codeaurora.org>
Thu, 21 Dec 2017 04:24:25 +0000 (09:54 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 May 2018 14:13:00 +0000 (16:13 +0200)
commit36d64865d33462851aaf35c1f8e021889beec15a
tree81c335a6f49d47277ceff6a28c26d8ecf84a306b
parent7a1edc325506d2671429e27753a29fc829847858
usb: gadget: core: Fix use-after-free of usb_request

[ Upstream commit e74bd4d358e5455233f1dcc3975425905b270b91 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/core.c