linux-alloc-avoid-potential-recursion-freeing-memory-and-schedule-when-vmalloc-fails...
authorDavid Howells <bartbanter@hotmail.com>
Tue, 25 Dec 2001 18:19:20 +0000 (18:19 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 25 Dec 2001 18:19:20 +0000 (18:19 +0000)
commitc1d2386e44573722f2cb16ee148b14960cd39670
tree7f67417a4baad56e3a68b7a441b86fce1bd883b0
parent3ea10ea3539f48ec30ba59399ec484cf4b0b74d3
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);"
src/afs/LINUX/osi_alloc.c