On Tuesday 12 March 2002 01:15, Peter Osterlund wrote:
Hi!
I was doing some stress testing on the packet writing patch for the 2.4.19-pre2 kernel. I was unpacking a kernel tarball to a cdrw disk on a freecom usb cdrw device. After a while, some problem occurred which made usb-storage decide to perform a bus reset. Unfortunately it needed to allocate memory first and the memory allocator decided it needed to do IO, which led to a deadlock.
I see that some changes went into 2.5.4-pre2 which I think would fix this problem. (Addition of a "mem_flags" parameter to various memory allocating functions in the usb subsystem.)
Are there any plans to include this fix in the 2.4.x kernel tree? (I didn't see it in the latest batch from Greg KH.)
I'd have placed a bet on somebody with a USB2.0 hard drive being the first to see this. This problem and some others are indeed fixed by the mem_flag parameter. If you need a quick and very dirty workaround go through usbcore and uhci to replace all occurences of GFP_KERNEL by GFP_NOIO. There's an additional question here. The new code will not deadlock, but a USB error could occur, if kmalloc fails. Is this acceptable ? Regards Oliver