kernel panic - freeing free mbuf
kernel panic - freeing free mbuf
- Subject: kernel panic - freeing free mbuf
- From: "Russell Seehafer (RIT Student)" <email@hidden>
- Date: Fri, 19 Aug 2005 12:51:59 -0400
- Thread-topic: kernel panic - freeing free mbuf
Title: kernel panic - freeing free mbuf
I have modified the apple example code for the tcplognke kernel extension (10.4 version) to selectively swallow packets, pass information to a user process and re-inject each packet (or drop it) when it recieves a response back from the user process (they communicate on a control socket). I swallow and re-inject each packet the same as in the tcplognke example (except my user process directs the re-injection, not a timer). I also use the same structures and queue's to hold the swallowed packets. The program works great for a while then I get a "freeing free mbuf" kernel panic. For the life of me I cannot figure out how I could have a reference to a free'd mbuf in my code. I have a routine that flushes the queue for a given socket (drops the data - does not re-inject) that is called when I recieve certain events on that socket (disconnecting, disconnected, closing, shutdown, cantrecmore, and cantsendmore ). Using the backtrace in the panic dump I can tell that it happends when I recieve a socket closing event and I flush the queue. If I remove the calls to the flush routine the same kernel panic is caused by my re-inject routine ( I free the packet if the sock_inject_data_out fails ). Any input or direction as to how I could have a reference to a free'd mbuf would be greatly appreciated!
-Russ
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden