usb: usbfs: fix double-free of usb memory upon submiturb error
authorGavin Li <git@thegavinli.com>
Sun, 4 Aug 2019 23:50:44 +0000 (16:50 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Aug 2019 08:12:38 +0000 (10:12 +0200)
commitb43611cd762c8b74b4ab4c714aa8de3beb08ff5c
tree91603d9e04272c97b5c2a747cdd56afd18b88451
parent6dbc3b74daeb3475354cd135fcbfe14ae6abfe24
usb: usbfs: fix double-free of usb memory upon submiturb error

commit c43f28dfdc4654e738aa6d3fd08a105b2bee758d 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 <git@thegavinli.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20190804235044.22327-1-gavinli@thegavinli.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/devio.c