Message ID | 20200326115620.12571-1-sallenki@codeaurora.org (mailing list archive) |
---|---|
State | Mainlined |
Commit | f63ec55ff904b2f2e126884fcad93175f16ab4bb |
Headers | show |
Series | [v2] usb: gadget: f_fs: Fix use after free issue as part of queue failure | expand |
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index 571917677d35..767f30b86645 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -1120,6 +1120,7 @@ static ssize_t ffs_epfile_io(struct file *file, struct ffs_io_data *io_data) ret = usb_ep_queue(ep->ep, req, GFP_ATOMIC); if (unlikely(ret)) { + io_data->req = NULL; usb_ep_free_request(ep->ep, req); goto error_lock; }