From: Nickolai Zeldovich Date: Sun, 20 Jan 2002 08:42:32 +0000 (+0000) Subject: STABLE12-linux22-also-alloc-avoid-potential-recursion-freeing-memory-and-schedule... X-Git-Tag: openafs-stable-1_2_3~42 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=e6ad8e51afc6c236812c61b4244531eb9aa008a7;p=packages%2Fo%2Fopenafs.git STABLE12-linux22-also-alloc-avoid-potential-recursion-freeing-memory-and-schedule-when-vmalloc-fails-20020120 linux 2.2 lacks set_current_state. currently in 2.4 it's a definition and not a real function, so this will work --- diff --git a/src/afs/LINUX/osi_alloc.c b/src/afs/LINUX/osi_alloc.c index 580e89961..46ebc4b54 100644 --- a/src/afs/LINUX/osi_alloc.c +++ b/src/afs/LINUX/osi_alloc.c @@ -103,7 +103,11 @@ static void *linux_alloc(unsigned int asize) if (--max_wait <=0) { break; } +#ifdef set_current_state set_current_state(TASK_INTERRUPTIBLE); +#else + current->state = TASK_INTERRUPTIBLE; +#endif schedule_timeout(HZ); } if (new) /* piggy back alloc type */