dazuko-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Dazuko-devel] 2.3.6-pre1 posted


From: Tikka, Sami
Subject: RE: [Dazuko-devel] 2.3.6-pre1 posted
Date: Tue, 22 Jul 2008 09:53:16 +0300

The reason I asked about the flags used in memory allocation was we had a
problem on a customer machine where xp_malloc was returning NULL in the reply
message buffer allocation. We also tried GFP_KERNEL and kernel complained
about holding locks while calling kmalloc. Eventually we fixed it with: 

--- orig/dazuko_core.c
+++ mod/dazuko_core.c
@@ -3231,7 +3231,7 @@
        if (request->reply_buffer_size > 0)
        {
                /* allocate reply text buffer */
-               request->reply_buffer = (char
*)call_xp_malloc(request->reply_buffer_size + 1);
+               request->reply_buffer = (char
*)call_xp_bigmalloc(request->reply_buffer_size + 1);
                if (request->reply_buffer == NULL)
                {
                        error = XP_ERROR_FAULT;
@@ -3313,7 +3313,7 @@
                        call_xp_free(request->buffer);
 
                if (request->reply_buffer != NULL)
-                       call_xp_free(request->reply_buffer);
+                       call_xp_bigfree(request->reply_buffer);
 
                call_xp_free(request);
        }

Where xp_bigmalloc was defined with

inline void *xp_bigmalloc(size_t size)
{
        return vmalloc(size);
}

We used xp_bigmalloc because we had it in our dazuko for other purposes.
Namely, we have implemented a scan result cache in dazuko. We haven't yet
contributed it but will soon.

-- 
Sami Tikka
F-Secure Corporation
BE SURE. 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]