aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorGavin Li <[email protected]>2019-08-04 23:50:44 +0000
committerGreg Kroah-Hartman <[email protected]>2019-08-05 15:27:52 +0000
commitc43f28dfdc4654e738aa6d3fd08a105b2bee758d (patch)
tree5c875723c4a6058d66bacab1d7ccf3059f391744 /drivers/usb/core
parentusb: yurex: Fix use-after-free in yurex_delete (diff)
downloadkernel-c43f28dfdc4654e738aa6d3fd08a105b2bee758d.tar.gz
kernel-c43f28dfdc4654e738aa6d3fd08a105b2bee758d.zip
usb: usbfs: fix double-free of usb memory upon submiturb error
Upon an error within proc_do_submiturb(), dec_usb_memory_use_count() gets called once by the error handling tail and again by free_async(). Remove the first call. Signed-off-by: Gavin Li <[email protected]> Acked-by: Alan Stern <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/devio.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index b265ab5405f9..9063ede411ae 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1812,8 +1812,6 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb
return 0;
error:
- if (as && as->usbm)
- dec_usb_memory_use_count(as->usbm, &as->usbm->urb_use_count);
kfree(isopkt);
kfree(dr);
if (as)