It's not a fault of kernel, it's just a mistake.
you should use
for(i=0 to 9)
pAddr[10] only has a range of 0 to 9.
miic> f_malloc()
miic> {
miic>      .....
miic>      for (i=1 to 10)
miic>      {
miic>      size = 1000;
miic>      pAddr[i] = (unsigned long) kmalloc(size, GFP_DMA | GFP_BUFFER);
miic>      }
miic>      ...
miic> }

miic> and freeing the allocated memory as follows

miic> f_free()
miic> {
miic>      .....
miic>      for (i=1 to 10)
miic>      {
miic>      kfree(pAddr[i]);
miic>      }
miic> }

miic> pAddr is defined as 'unsigned long pAddr[10]'

miic> But when f_free executes i ran into problems and computer hangs.
miic> What can be the problem?????


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to