Saturday 15 March 2014

c - Balancing memory usage in Linux kernel -



c - Balancing memory usage in Linux kernel -

i'm developing network driver linux kernel. i've got several if-else conditions i'm reallocating or freeing "skb" structures - , here place i'm bit confused. regarding do in if-else - got 2 kind of errors:

calltrace because double free of skb , kernel panic , reboot mem-leak because don't free skb

my question - there kind of formal method looking mem-leaks or double-mem-free errors? know kernel uses memory poisoning after freeing skb, don't tell me bug.

sorry, i'm not allowed share code of driver.

kmemleak seems friend. please check if http://lwn.net/articles/187193/ can help. worth comment reputation not 50 can't add together comment question.

c linux linux-kernel linux-device-driver

No comments:

Post a Comment