ChangeSet 1.1143.1.1, 2003/03/19 11:21:52-08:00, [EMAIL PROTECTED]

[PATCH] USB: fix to synchronous API regarding memory allocation

some part of the synchronous API is used in the block io error handling
code paths. Therefore it may use only GFP_NOIO, not GFP_KERNEL.
  - avoid deadlock due to wrong memory allocation in block io path


 drivers/usb/core/message.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


diff -Nru a/drivers/usb/core/message.c b/drivers/usb/core/message.c
--- a/drivers/usb/core/message.c        Thu Mar 20 15:04:24 2003
+++ b/drivers/usb/core/message.c        Thu Mar 20 15:04:24 2003
@@ -88,7 +88,7 @@
        int retv;
        int length;
 
-       urb = usb_alloc_urb(0, GFP_KERNEL);
+       urb = usb_alloc_urb(0, GFP_NOIO);
        if (!urb)
                return -ENOMEM;
   
@@ -131,7 +131,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)



-------------------------------------------------------
This SF.net email is sponsored by: Tablet PC.  
Does your code think in ink? You could win a Tablet PC. 
Get a free Tablet PC hat just for playing. What are you waiting for? 
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to