]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 17 Sep 2019 16:02:18 +0000 (18:02 +0200)
commit08cb535a0979237b200ae1e621931520ba8a8e2a
tree38f4c00b4047ac8ac998182b44f7ffbc645e7128
parentb92747aba2c106db4a48c197e102a63d5ae5f337
usb: usbfs: fix double-free of usb memory upon submiturb error

BugLink: https://bugs.launchpad.net/bugs/1840520
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/usb/core/devio.c