diff options
author | fb209375 <none@none> | 2007-04-24 19:26:48 -0700 |
---|---|---|
committer | fb209375 <none@none> | 2007-04-24 19:26:48 -0700 |
commit | 26d97b1b85350d431fb75bb4f40b71c5c03a19e9 (patch) | |
tree | 567cd25bba47c87e3ac8efcd662a922bb4898910 /usr/src | |
parent | a5682f5243c3b36a55009c52d62edab683b28ccf (diff) | |
download | illumos-gate-26d97b1b85350d431fb75bb4f40b71c5c03a19e9.tar.gz |
6516938 panic happen when force the usbvc driver to attach to a webcam not compliant to usb video class spec
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/io/usb/clients/video/usbvc/usbvc.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr/src/uts/common/io/usb/clients/video/usbvc/usbvc.c b/usr/src/uts/common/io/usb/clients/video/usbvc/usbvc.c index 1ad5906c10..6fe2c5b5ec 100644 --- a/usr/src/uts/common/io/usb/clients/video/usbvc/usbvc.c +++ b/usr/src/uts/common/io/usb/clients/video/usbvc/usbvc.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -2154,6 +2154,17 @@ usbvc_parse_ctrl_if(usbvc_state_t *usbvcp) } } + /* + * For webcam which is not compliant to video class specification + * and no header descriptor in VC interface, return USB_FAILURE. + */ + if (!usbvcp->usbvc_vc_header) { + USB_DPRINTF_L2(PRINT_MASK_ATTA, usbvcp->usbvc_log_handle, + "usbvc_parse_ctrl_if: no header descriptor"); + + return (USB_FAILURE); + } + return (USB_SUCCESS); } |