]> git.baikalelectronics.ru Git - kernel.git/commit
USB: serial: mos7840: fix NULL-deref at open
authorJohan Hovold <johan@kernel.org>
Tue, 3 Jan 2017 15:39:55 +0000 (16:39 +0100)
committerJohan Hovold <johan@kernel.org>
Wed, 4 Jan 2017 09:37:20 +0000 (10:37 +0100)
commitca4cdbb9472904cc59b625e73cef903f1f9aef7d
treec13653b5c65ae3a665c28a3c5f0e98698908c924
parent57a3c88c389adba117fcd43aacedb74c42936846
USB: serial: mos7840: fix NULL-deref at open

Fix NULL-pointer dereference in open() should the device lack the
expected endpoints:

Unable to handle kernel NULL pointer dereference at virtual address 00000030
...
PC is at mos7840_open+0x88/0x8dc [mos7840]

Note that we continue to treat the interrupt-in endpoint as optional for
now.

Fixes: 02cbf9df1916 ("USB: Moschip 7840 USB-Serial Driver")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/mos7840.c