linux-stable/drivers/usb/misc
Hangyu Hua 452bb6e27b usb: misc: fix improper handling of refcount in uss720_probe()
commit 0a96fa640d upstream.

usb_put_dev shouldn't be called when uss720_probe succeeds because of
priv->usbdev. At the same time, priv->usbdev shouldn't be set to NULL
before destroy_priv in uss720_disconnect because usb_put_dev is in
destroy_priv.

Fix this by moving priv->usbdev = NULL after usb_put_dev.

Fixes: dcb4b8ad6a ("misc/uss720: fix memory leak in uss720_probe")
Cc: stable <stable@kernel.org>
Reviewed-by: Dongliang Mu <mudongliangabcd@gmail.com>
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Link: https://lore.kernel.org/r/20220407024001.11761-1-hbh25y@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-12 12:14:54 +02:00
..
sisusbvga USB: sisusbvga: Make console support depend on BROKEN 2020-12-29 13:44:49 +01:00
adutux.c USB: adutux: fix debugging 2020-11-10 10:23:53 +01:00
appledisplay.c appledisplay: fix error handling in the scheduled work 2019-11-28 18:29:05 +01:00
chaoskey.c USB: chaoskey: fix error case of a timeout 2019-11-28 18:29:05 +01:00
cypress_cy7c63.c
cytherm.c
ehset.c
emi26.c
emi62.c
ezusb.c
ftdi-elan.c usb: ftdi-elan: fix memory leak on device disconnect 2022-01-27 08:47:34 +01:00
idmouse.c USB: idmouse: fix interface sanity checks 2019-12-21 10:41:53 +01:00
iowarrior.c USB: iowarrior: fix control-message timeouts 2021-11-26 11:48:26 +01:00
isight_firmware.c
Kconfig USB: rio500: Remove Rio 500 kernel driver 2019-10-17 13:42:26 -07:00
ldusb.c USB: ldusb: fix control-message timeout 2019-11-06 12:18:19 +01:00
legousbtower.c USB: legousbtower: fix a signedness bug in tower_probe() 2019-11-06 12:18:13 +01:00
lvstest.c USB: lvtest: return proper error code in probe 2020-09-03 11:21:20 +02:00
Makefile USB: rio500: Remove Rio 500 kernel driver 2019-10-17 13:42:26 -07:00
trancevibrator.c USB: trancevibrator: fix control-request direction 2021-06-03 08:23:29 +02:00
ucsi.c
ucsi.h
usb3503.c
usb4604.c
usb_u132.h
usblcd.c USB: usblcd: fix I/O after disconnect 2019-10-17 13:42:38 -07:00
usbsevseg.c
usbtest.c usb: usbtest: fix missing kfree(dev->buf) in usbtest_disconnect 2020-07-09 09:35:55 +02:00
uss720.c usb: misc: fix improper handling of refcount in uss720_probe() 2022-05-12 12:14:54 +02:00
yurex.c USB: yurex: fix control-URB timeout handling 2021-01-12 19:49:04 +01:00