Re: [linux-usb-devel] Re: USB hangs
From: Alan Stern
Date: Mon Jan 12 2004 - 10:54:15 EST
On Mon, 12 Jan 2004, Oliver Neukum wrote:
> diff -Nru a/drivers/usb/usb.c b/drivers/usb/usb.c
> --- a/drivers/usb/usb.c Mon Jan 12 00:27:37 2004
> +++ b/drivers/usb/usb.c Mon Jan 12 00:27:37 2004
> @@ -1198,7 +1198,7 @@
> int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype,
> __u16 value, __u16 index, void *data, __u16 size, int timeout)
> {
> - struct usb_ctrlrequest *dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL);
> + struct usb_ctrlrequest *dr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_NOIO);
> int ret;
>
> if (!dr)
> @@ -1958,7 +1958,7 @@
> if (result < 0)
> return result;
>
> - buffer = kmalloc(sizeof(status), GFP_KERNEL);
> + buffer = kmalloc(sizeof(status), GFP_NOIO);
> if (!buffer) {
> err("unable to allocate memory for configuration descriptors");
> return -ENOMEM;
Note that these changes have essentially already been incorporated into
2.6, so only 2.4 needs updating.
Alan Stern
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/