[openib-general] Re: Page allocation failures & kdapltest oops

James Lentini jlentini at netapp.com
Tue Sep 27 09:40:01 PDT 2005



On Mon, 26 Sep 2005, Hal Rosenstock wrote:

> Hi James,
> 
> I keep getting the following when running kdapltest. This is similar to
> what I saw before and reported a couple of times but now seems more
> consistent in occurring.
> 
> -- Hal

Until the point at which the page allocation fails, I don't see 
anything too out of the ordinary. kdapltest is posting a send and is 
attempting to log a message reporting that to the user. To log the 
message, DT_Tdep_PT_Printf needs to allocate memory (256 bytes + a 
pointer). This is when the memory allocation fails.

It looks like you have DEBUG_PAGEALLOC turned on. Is that correct? My 
test systems don't have this turned on. I'll turn it on and see what 
happens.

Since we don't check for a kmalloc failure in DT_Tdep_PT_Printf, this 
oops occurs:

> Sep 26 10:29:30 hal kernel: Unable to handle kernel NULL pointer 
> dereference at virtual address 00000004

I've checked in the patch below to fix that, but this is not the root 
of the problem. 

Index: kdapl/kdapl_tdep_print.c
===================================================================
--- kdapl/kdapl_tdep_print.c	(revision 3564)
+++ kdapl/kdapl_tdep_print.c	(working copy)
@@ -106,7 +106,13 @@
     int			len;
     Tdep_Print_Entry 	*entry;
     unsigned long flags;
+
     entry = DT_Mdep_Malloc (sizeof (Tdep_Print_Entry));
+    if (!entry)
+    {
+	printk(KERN_ERR "%s: out of memory\n", __func__);
+	return;
+    }
 
     va_start (args, fmt);
     len = vsnprintf (entry->buffer, PRINT_MAX, fmt, args);



More information about the general mailing list