kfree_skb() crashing with 'null pointer dereferencing error'
I was writing an kernel module. What I was trying to do is grab a few rtp packets, then merge them as a new packet and drop the grabbed packets. After merging some desired number of packets I was sending the merged packets.
For this I needed to allocate a new sk_buff and copy the data from original skb. For copying I used two functions - 'skb_copy' and 'skb_copy_expand'. Problem is after some times of running, kernel is panicking. If I turn on the debug symbol it shows that it is panicking from 'kfree_skb' as a result of 'null pointer dereferencing error'. I checked, but I couldn't find any kind of error for which 'null pointer dereferencing error' could occur. What possibly can be the problem?
|