linux-alloc-avoid-potential-recursion-freeing-memory-and-schedule-when-vmalloc-fails-
20011225
"The first is to change the gfp_mask passed to kmalloc(). Using GFP_KERNEL,
it is possible that the VM will call back to the filesystem to free up
memory to satisfy the kmalloc request. GFP_NOFS will prevent this possible
recursion. I believe GFP_NOFS first appeared in the 2.4.6 kernel.
The second change involves the call to schedule() when vmalloc() fails. This
can also cause a hang. The schedule() call could be replaced with:
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(HZ);"