]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: cdc-acm: Fixing crash when ACM probing interfaces with no endpoint descriptors.
authorToby Gray <toby.gray@realvnc.com>
Thu, 2 Sep 2010 09:46:20 +0000 (10:46 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Sep 2010 20:17:49 +0000 (13:17 -0700)
commite9f19071157e76312b0c3ae3d85d9649189c2963
tree451dbfd352c3480c5bd216f1fdcef2c29f67aa62
parent77192da03aee9acb33a7f5f137c0b422565cc7e2
USB: cdc-acm: Fixing crash when ACM probing interfaces with no endpoint descriptors.

commit 577045c0a76e34294f902a7d5d60e90b04d094d0 upstream.

Certain USB devices, such as the Nokia X6 mobile phone, don't expose any
endpoint descriptors on some of their interfaces. If the ACM driver is forced
to probe all interfaces on a device the a NULL pointer dereference will occur
when the ACM driver attempts to use the endpoint of the alternative settings.
One way to get the ACM driver to probe all the interfaces is by using the
/sys/bus/usb/drivers/cdc_acm/new_id interface.

This patch checks that the endpoint pointer for the current alternate settings
is non-NULL before using it.

Signed-off-by: Toby Gray <toby.gray@realvnc.com>
Cc: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/class/cdc-acm.c