]> git.baikalelectronics.ru Git - kernel.git/commit
hso: Fix crashes on close.
authorDenis Joseph Barrow <D.Barow@option.com>
Tue, 25 Nov 2008 08:27:50 +0000 (00:27 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Nov 2008 08:27:50 +0000 (00:27 -0800)
commit80b7a7f8a785f92d913cf3f570b4d4dc3f165539
tree81b61003ba0ab52b89cca0792fab63c12aeff344
parent600f9020d40613e96cda64fb71114b6148010375
hso: Fix crashes on close.

Moved serial_open_count in hso_serial_open to
prevent crashes owing to the serial structure being made NULL
when hso_serial_close is called even though hso_serial_open
returned -ENODEV, Alan Cox pointed out this happens,
also put in sanity check in hso_serial_close
to check for a valid serial structure which should prevent
the most reproducable crash in the driver when the hso device
is disconnected while in use.

Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/hso.c