On Wed, 15 Dec 2010, Felipe Balbi wrote:

> >+{
> >+    int ret;
> >+    struct usb_bus *bus =
> >+            container_of(work, struct usb_bus, hnp_polling.work);
> >+    struct usb_device *udev = bus->root_hub->children[bus->otg_port - 1];
> >+    u8 *status = kmalloc(sizeof(*status), GFP_KERNEL);
> 
> how about:
> 
> u8 status;
> 
> and...
> 
> >+    if (!status)
> >+            return;
> >+
> >+    ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
> >+            USB_REQ_GET_STATUS, USB_DIR_IN | USB_RECIP_DEVICE,
> >+            0, OTG_STATUS_SELECTOR, status, sizeof(*status),
> 
> 0, OTG_STATUS_SELECTOR, &status, sizeof(status);
> ??

You mustn't do DMA to addresses on the stack.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to