]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: fix port probing and removal in garmin_gps
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 10 Oct 2012 18:10:21 +0000 (14:10 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Oct 2012 17:56:14 +0000 (10:56 -0700)
commit1f212892776010ea4ebc9982e7a725732df3a7f0
tree9fdb95ea43eba6d25099b8e1f08a28a59e85fdfc
parent4e0532a22664501721fdd89a00d61948c1e34a23
USB: fix port probing and removal in garmin_gps

commit db5c8b524444d4fc6b1f32d368a50a3729e50002 upstream.

This patch (as1615) fixes a bug in the Garmin USB serial driver.  It
uses attach, disconnect, and release routines to carry out actions
that should be handled by port_probe and port_remove routines, because
they access port-specific data.

The bug causes an oops when the device in unplugged, because the
private data for each port structure now gets erased when the port is
unbound from the driver, resulting in a null-pointer dereference.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported--by: Markus Schauler <mschauler@gmail.com>
Tested-by: Markus Schauler <mschauler@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/garmin_gps.c