USB: ldusb: fix memleak on disconnect
authorJohan Hovold <johan@kernel.org>
Thu, 10 Oct 2019 12:58:34 +0000 (14:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Oct 2019 08:15:16 +0000 (09:15 +0100)
commit1b64bc2abc569640e65ab9792850254f46025f5b
treed75c7e67d8a7ed6acb087a54453afeabd29845ba
parentafa3bc254e0f054865f8b18d298f273e00c39849
USB: ldusb: fix memleak on disconnect

commit b14a39048c1156cfee76228bf449852da2f14df8 upstream.

If disconnect() races with release() after a process has been
interrupted, release() could end up returning early and the driver would
fail to free its driver data.

Fixes: 2824bd250f0b ("[PATCH] USB: add ldusb driver")
Cc: stable <stable@vger.kernel.org> # 2.6.13
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20191010125835.27031-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/ldusb.c