[OpenAFS] Re: vmalloc troubles with 1.4.2
Joe Buehler
aspam@cox.net
Tue, 05 Dec 2006 15:08:11 -0500
Mike Dopheide wrote:
> Dec 4 13:18:03 osage kernel: afs_osi_Alloc: Can't vmalloc 4524 bytes.
> Dec 4 13:18:03 osage kernel: crget: No more memory for creds!
> Dec 4 13:18:05 osage kernel: Unable to handle kernel NULL pointer
> dereference at virtual address 00000000
This bit me also. It was a known bug for which I submitted a patch,
but an alternate patch was coded up by someone, but never tested at large,
so it never made it to 1.4.2.
Here is my patch:
--- src/afs/LINUX/osi_cred.c.~1~ 2005-04-03 15:49:21.000000000 -0400
+++ src/afs/LINUX/osi_cred.c 2006-06-02 10:08:58.000000000 -0400
@@ -21,7 +21,7 @@
#include "afsincludes.h"
/* Setup a pool for creds. Allocate several at a time. */
-#define CRED_ALLOC_STEP 29 /* at 140 bytes/cred = 4060 bytes. */
+#define CRED_ALLOC_STEP (PAGE_SIZE / sizeof(cred_t)) /* allocate <= 1 page at a time */
static cred_t *cred_pool = NULL;
--
Joe Buehler