]> git.baikalelectronics.ru Git - kernel.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>
Tue, 16 Oct 2012 17:25:55 +0000 (10:25 -0700)
commitf4b9a1f43459ca03f48a9cd0bf0d5f2d0ec6a491
treeed09dfb961fd6c505dc292cf26335e7110db5fe3
parent5c842d7d4ec6e0891a95dec4ac74feeee982781c
USB: fix port probing and removal in garmin_gps

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>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/garmin_gps.c