Skip to content

Commit 44db85e

Browse files
Gavin Ligregkh
authored andcommitted
usb: usbfs: fix double-free of usb memory upon submiturb error
commit c43f28d upstream. 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]>
1 parent e88103e commit 44db85e

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/usb/core/devio.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1811,8 +1811,6 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb
18111811
return 0;
18121812

18131813
error:
1814-
if (as && as->usbm)
1815-
dec_usb_memory_use_count(as->usbm, &as->usbm->urb_use_count);
18161814
kfree(isopkt);
18171815
kfree(dr);
18181816
if (as)

0 commit comments

Comments
 (0)