Prev: [PATCH] perf: fix Makefile check for libdward
Next: [PATCH 0/4] Squashfs: add xattr file system support
From: Maurus Cuelenaere on 17 May 2010 15:20 The composite driver doesn't verify whether gadgets are dual speed when using the high speed descriptors. USB drivers don't set usb_function->hs_descriptors on non-dual speed gadgets, which result in dereferencing a NULL pointer in set_config(). Signed-off-by: Maurus Cuelenaere <mcuelenaere(a)gmail.com> --- drivers/usb/gadget/composite.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 09289bb..fa07267 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -431,7 +431,8 @@ static int set_config(struct usb_composite_dev *cdev, * function's setup callback instead of the current * configuration's setup callback. */ - if (gadget->speed == USB_SPEED_HIGH) + if (gadget->speed == USB_SPEED_HIGH + && gadget_is_dualspeed(gadget)) descriptors = f->hs_descriptors; else descriptors = f->descriptors; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |