linux/drivers/usb/serial
Johan Hovold bd73bd8831 USB: usb_wwan: fix handling of missing bulk endpoints
Fix regression introduced by commit 8e493ca176 ("USB: usb_wwan: fix
bulk-urb allocation") by making sure to require both bulk-in and out
endpoints during port probe.

The original option driver (which usb_wwan is based on) was written
under the assumption that either endpoint could be missing, but
evidently this cannot have been tested properly. Specifically, it would
handle opening a device without bulk-in (but would blow up during resume
which was implemented later), but not a missing bulk-out in write()
(although it is handled in some places such as write_room()).

Fortunately (?), the driver also got the test for missing endpoints
wrong so the urbs were in fact always allocated, although they would be
initialised using the wrong endpoint address (0) and any submission of
such an urb would fail.

The commit mentioned above fixed the test for missing endpoints but
thereby exposed the other bugs which would now generate null-pointer
exceptions rather than failed urb submissions.

The regression was introduced in v3.7, but the offending commit was also
marked for stable.

Reported-by: Rafał Miłecki <zajec5@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Tested-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-16 13:56:07 -07:00
..
aircable.c USB: serial: correct spelling mistakes in comments 2014-01-03 12:39:31 -08:00
ark3116.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
belkin_sa.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
belkin_sa.h
bus.c usb: core: allow a reference device for new_id 2014-01-10 16:54:35 -08:00
ch341.c USB: serial: add missing newlines to dev_<level> messages. 2014-03-12 12:44:50 -07:00
console.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
cp210x.c USB: cp210x: Add 8281 (Nanotec Plug & Drive) 2014-04-16 13:56:07 -07:00
cyberjack.c USB: serial: add missing newlines to dev_<level> messages. 2014-03-12 12:44:50 -07:00
cypress_m8.c USB: serial: add missing newlines to dev_<level> messages. 2014-03-12 12:44:50 -07:00
cypress_m8.h USB: cypress_m8: only wake up MSR queue on changes 2014-01-03 12:42:24 -08:00
digi_acceleport.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
empeg.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
ezusb_convert.pl
f81232.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
ftdi_sio_ids.h USB: serial: ftdi_sio: add id for Brainboxes serial cards 2014-04-16 13:38:25 -07:00
ftdi_sio.c USB: serial: ftdi_sio: add id for Brainboxes serial cards 2014-04-16 13:38:25 -07:00
ftdi_sio.h USB: ftdi_sio: add support for FT-X series devices 2012-03-14 15:43:05 -07:00
garmin_gps.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
generic.c USB: serial: add missing braces 2014-03-12 12:44:50 -07:00
io_16654.h
io_edgeport.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
io_edgeport.h
io_ionsp.h
io_tables.h USB: io_edgeport: switch to generic TIOCMIWAIT implementation 2013-03-25 13:50:53 -07:00
io_ti.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
io_ti.h
io_usbvend.h
ipaq.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
ipw.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
ir-usb.c USB: serial: remove redundant OOM messages 2014-01-03 12:31:46 -08:00
iuu_phoenix.c USB: serial: add missing newlines to dev_<level> messages. 2014-03-12 12:44:50 -07:00
iuu_phoenix.h
Kconfig USB: serial: add Moxa UPORT 12XX/14XX/16XX driver 2014-01-03 12:34:07 -08:00
keyspan_pda.c USB: serial: add missing newlines to dev_<level> messages. 2014-03-12 12:44:50 -07:00
keyspan_usa26msg.h USB: serial: correct spelling mistakes in comments 2014-01-03 12:39:31 -08:00
keyspan_usa28msg.h
keyspan_usa49msg.h
keyspan_usa67msg.h
keyspan_usa90msg.h
keyspan.c USB: keyspan: remove dead debugging code 2014-03-12 12:44:50 -07:00
keyspan.h USB: keyspan: fix NULL-pointer dereferences and memory leaks 2012-10-25 09:37:13 -07:00
kl5kusb105.c USB: serial: add missing newlines to dev_<level> messages. 2014-03-12 12:44:50 -07:00
kl5kusb105.h
kobil_sct.c USB: serial: add missing newlines to dev_<level> messages. 2014-03-12 12:44:50 -07:00
kobil_sct.h
Makefile USB: serial: add Moxa UPORT 12XX/14XX/16XX driver 2014-01-03 12:34:07 -08:00
Makefile-keyspan_pda_fw
mct_u232.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
mct_u232.h
metro-usb.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
mos7720.c USB: serial: add missing newlines to dev_<level> messages. 2014-03-12 12:44:50 -07:00
mos7840.c USB: serial: add missing newlines to dev_<level> messages. 2014-03-12 12:44:50 -07:00
mxuport.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
navman.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
omninet.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
opticon.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
option.c usb: option driver, add support for Telit UE910v2 2014-04-16 13:44:59 -07:00
oti6858.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
oti6858.h
pl2303.c USB: pl2303: add ids for Hewlett-Packard HP POS pole displays 2014-04-16 13:56:07 -07:00
pl2303.h USB: pl2303: add ids for Hewlett-Packard HP POS pole displays 2014-04-16 13:56:07 -07:00
qcaux.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
qcserial.c usb: qcserial: add Netgear Aircard 340U 2014-02-05 11:39:30 -08:00
quatech2.c USB: serial: add missing newlines to dev_<level> messages. 2014-03-12 12:44:50 -07:00
safe_serial.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
sierra.c Revert "USB: serial: add usbid for dell wwan card to sierra.c" 2014-04-16 13:44:58 -07:00
spcp8x5.c USB: serial: add missing newlines to dev_<level> messages. 2014-03-12 12:44:50 -07:00
ssu100.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
symbolserial.c USB: serial: add missing newlines to dev_<level> messages. 2014-03-12 12:44:50 -07:00
ti_usb_3410_5052.c USB: serial: add missing newlines to dev_<level> messages. 2014-03-12 12:44:50 -07:00
ti_usb_3410_5052.h USB: serial: ti_usb_3410_5052: new device id for Abbot strip port cable 2013-06-19 15:54:45 -07:00
usb_debug.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
usb_wwan.c USB: usb_wwan: fix handling of missing bulk endpoints 2014-04-16 13:56:07 -07:00
usb-serial-simple.c USB: simple: add Dynastream ANT USB-m Stick device support 2014-02-04 12:59:15 -08:00
usb-serial.c USB: serial: add missing newlines to dev_<level> messages. 2014-03-12 12:44:50 -07:00
usb-wwan.h USB: usb-wwan: fix multiple memory leaks in error paths 2012-10-25 09:37:13 -07:00
visor.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
visor.h USB: serial: correct spelling mistakes in comments 2014-01-03 12:39:31 -08:00
whiteheat.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
whiteheat.h
wishbone-serial.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
xsens_mt.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00
zte_ev.c usb: delete non-required instances of include <linux/init.h> 2014-01-08 15:01:39 -08:00