Files
android_kernel_xiaomi_sm8450/drivers/usb/serial
Johan Hovold f79b2d0fe8 USB: keyspan: fix NULL-pointer dereferences and memory leaks
Fix NULL-pointer dereference at release by moving port data allocation
and deallocation to port_probe and port_remove.

Fix NULL-pointer dereference at disconnect by stopping port urbs at
port_remove.

Since commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer accessible at
disconnect or release.

Note that this patch also fixes port and interface-data memory leaks in
the error path of attach should port initialisation fail for any port.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-25 09:37:13 -07:00
..
2012-10-25 09:36:57 -07:00
2011-03-31 11:26:23 -03:00
2010-05-20 13:21:47 -07:00
2012-10-25 09:37:09 -07:00
2012-10-18 08:27:21 -07:00
2011-11-15 10:06:15 -08:00
2010-05-20 13:21:47 -07:00
2012-09-13 10:15:14 -07:00