All of lore.kernel.org
 help / color / mirror / Atom feed
* network support : memory management problem
@ 2005-05-31 13:48 Vincent Guffens
  2005-05-31 16:45 ` Vincent Guffens
  2005-05-31 22:56 ` network support : memory management problem Yoshinori K. Okuji
  0 siblings, 2 replies; 13+ messages in thread
From: Vincent Guffens @ 2005-05-31 13:48 UTC (permalink / raw)
  To: grub-devel

Hi,

I sent a similar e-mail yesterday but I think it didn't get through.

I have a working version of the netboot support in grub2. I can issue 
commands like (seeking in file is not yet possible):

cat (nd0)test.txt
linux (nd0)linux24

but depending on where in the code I free my data blocks, I sometimes 
get a  "free magic is broken" fatal error msg from grub_free().

I found out that if I use the grub_printf() function just before the 
call to grub_free(), the problem disappears.

That is to say that in my grub_net_close function (the close file 
function associated with the net binding file system), I do something like:

struct grub_netfs_data * priv =  (struct grub_netfs_data *) file->data;
struct grub_netfs_block *pp, * p = priv->head;

grub_printf("FREEING\n");

if (p)
   pp = p->next;

   while (p) {
     if ((p->data)){
       grub_free(p->data);
     }


If I remove the FREEING msg, I have the panic error message, otherwise, 
everything looks fine. The exact error message is

free magic is broken at 0x85900: 0x0

Does someone has an idea ? Is there some documentation available about 
the mm in grub2 ?

The full code is available on this web page:
http://www.auto.ucl.ac.be/~guffens/grub2_netboot/index.html


-- 
				Vincent Guffens
				PhD Student UCL/CESAME
				tel:   +32 10 47 80 30
Value your freedom, or you will lose it, teaches history.
"Don't bother us with politics," respond those who don't want to learn.
	      	-- Richard M. Stallman



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-06-13 20:04 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-31 13:48 network support : memory management problem Vincent Guffens
2005-05-31 16:45 ` Vincent Guffens
2005-05-31 17:08   ` Marco Gerards
2005-06-06 10:03     ` Vincent Guffens
2005-06-08 19:38       ` Marco Gerards
2005-06-09 23:09         ` Vincent Guffens
2005-06-12  8:54           ` Scripting and keystrokes Serbinenko Vladimir
2005-06-13 18:09             ` Serbinenko Vladimir
2005-06-13 18:52               ` Yoshinori K. Okuji
2005-06-13 19:39                 ` Serbinenko Vladimir
2005-06-13 18:50             ` Yoshinori K. Okuji
2005-06-13 19:47               ` Serbinenko Vladimir
2005-05-31 22:56 ` network support : memory management problem Yoshinori K. Okuji

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.