linux/drivers/usb/serial
Jiri Slaby 38237fd2be USB: serial/usb_wwan, fix tty NULL dereference
tty_port_tty_get may return without any problems NULL. Handle this
case and do not oops in usb_wwan_indat_callback by dereferencing it.

The oops:
Unable to handle kernel paging request for data at address 0x000000d8
Faulting instruction address: 0xc0175b3c
Oops: Kernel access of bad area, sig: 11 [#1]
PowerPC 40x Platform
last sysfs file:
/sys/devices/pci0000:00/0000:00:00.0/0000:01:00.0/0000:02:09.2/usb1/idVendor
Modules linked in:
NIP: c0175b3c LR: c0175e7c CTR: c0215c90
REGS: c77f7d50 TRAP: 0300   Not tainted  (2.6.37-rc5)
MSR: 00021030 <ME,CE,IR,DR>  CR: 88482028  XER: 2000005f
DEAR: 000000d8, ESR: 00000000
TASK = c7141b90[1149] 'wvdial' THREAD: c2750000
GPR00: 00021030 c77f7e00 c7141b90 00000000 0000000e 00000000 0000000e c0410680
GPR08: c683db00 00000000 00000001 c03c81f8 88482028 10073ef4 ffffffb9 ffffff94
GPR16: 00000000 fde036c0 00200200 00100100 00000001 ffffff8d c34fabcc 00000000
GPR24: c71120d4 00000000 00000000 0000000e 00021030 00000000 00000000 0000000e
NIP [c0175b3c] tty_buffer_request_room+0x2c/0x194
LR [c0175e7c] tty_insert_flip_string_fixed_flag+0x3c/0xb0
Call Trace:
[c77f7e00] [00000003] 0x3 (unreliable)
[c77f7e30] [c0175e7c] tty_insert_flip_string_fixed_flag+0x3c/0xb0
[c77f7e60] [c0215df4] usb_wwan_indat_callback+0x164/0x170
...

References: https://bugzilla.kernel.org/show_bug.cgi?id=24582
Cc: Amit Shah <amitshah@gmx.net>
Cc: baoyb <baoyb@avit.org.cn>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-17 10:30:25 -08:00
..
aircable.c
ark3116.c
belkin_sa.c
belkin_sa.h
bus.c
ch341.c USB: serial: handle Data Carrier Detect changes 2011-01-22 18:53:26 -08:00
ChangeLog.history
console.c
cp210x.c USB: serial: handle Data Carrier Detect changes 2011-01-22 18:53:26 -08:00
cyberjack.c
cypress_m8.c
cypress_m8.h
digi_acceleport.c USB: serial: handle Data Carrier Detect changes 2011-01-22 18:53:26 -08:00
empeg.c
ezusb_convert.pl
ezusb.c
ftdi_sio_ids.h USB: ftdi_sio: Add VID=0x0647, PID=0x0100 for Acton Research spectrograph 2011-02-03 16:49:42 -08:00
ftdi_sio.c USB: ftdi_sio: Add VID=0x0647, PID=0x0100 for Acton Research spectrograph 2011-02-03 16:49:42 -08:00
ftdi_sio.h
funsoft.c
garmin_gps.c
generic.c USB: serial: handle Data Carrier Detect changes 2011-01-22 18:53:26 -08:00
hp4x.c
io_16654.h
io_edgeport.c USB: io_edgeport: fix the reported firmware major and minor 2011-02-03 16:40:58 -08:00
io_edgeport.h
io_ionsp.h
io_tables.h USB serial: add missing .usb_driver field in serial drivers 2011-01-22 18:38:59 -08:00
io_ti.c
io_ti.h
io_usbvend.h
ipaq.c
ipw.c
ir-usb.c
iuu_phoenix.c USB serial: add missing .usb_driver field in serial drivers 2011-01-22 18:38:59 -08:00
iuu_phoenix.h
Kconfig
keyspan_pda.c USB: serial: handle Data Carrier Detect changes 2011-01-22 18:53:26 -08:00
keyspan_usa26msg.h
keyspan_usa28msg.h
keyspan_usa49msg.h
keyspan_usa67msg.h
keyspan_usa90msg.h
keyspan.c
keyspan.h USB serial: add missing .usb_driver field in serial drivers 2011-01-22 18:38:59 -08:00
kl5kusb105.c
kl5kusb105.h
kobil_sct.c
kobil_sct.h
Makefile
Makefile-keyspan_pda_fw
mct_u232.c
mct_u232.h
mos7720.c
mos7840.c
moto_modem.c USB serial: add missing .usb_driver field in serial drivers 2011-01-22 18:38:59 -08:00
navman.c
omninet.c
opticon.c
option.c USB: adding USB support for Cinterion's HC2x, EU3 and PH8 products 2011-01-22 18:40:21 -08:00
oti6858.c USB serial: add missing .usb_driver field in serial drivers 2011-01-22 18:38:59 -08:00
oti6858.h
pl2303.c USB: serial: handle Data Carrier Detect changes 2011-01-22 18:53:26 -08:00
pl2303.h drivers: update to pl2303 usb-serial to support Motorola cables 2011-01-22 18:44:38 -08:00
qcaux.c USB serial: add missing .usb_driver field in serial drivers 2011-01-22 18:38:59 -08:00
qcserial.c
safe_serial.c
sam-ba.c
siemens_mpi.c USB serial: add missing .usb_driver field in serial drivers 2011-01-22 18:38:59 -08:00
sierra.c
spcp8x5.c USB: serial: handle Data Carrier Detect changes 2011-01-22 18:53:26 -08:00
ssu100.c
symbolserial.c
ti_usb_3410_5052.c USB: ti_usb: fix module removal 2011-02-03 16:40:59 -08:00
ti_usb_3410_5052.h
usb_debug.c USB serial: add missing .usb_driver field in serial drivers 2011-01-22 18:38:59 -08:00
usb_wwan.c USB: serial/usb_wwan, fix tty NULL dereference 2011-02-17 10:30:25 -08:00
usb-serial.c USB serial: add missing .usb_driver field in serial drivers 2011-01-22 18:38:59 -08:00
usb-wwan.h
visor.c USB: Add Samsung SGH-I500/Android modem ID switch to visor driver 2011-02-17 10:30:23 -08:00
visor.h
vivopay-serial.c
whiteheat.c
whiteheat.h
zio.c