Skip to content

Commit c43f28d

Browse files
Gavin Ligregkh
authored andcommitted
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]>
1 parent fc05481 commit c43f28d

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
@@ -1812,8 +1812,6 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb
18121812
return 0;
18131813

18141814
error:
1815-
if (as && as->usbm)
1816-
dec_usb_memory_use_count(as->usbm, &as->usbm->urb_use_count);
18171815
kfree(isopkt);
18181816
kfree(dr);
18191817
if (as)

0 commit comments

Comments
 (0)