Thank you so much for your reply! I really appreciate it. Quote: |
Originally Posted by Dolda2000 How can you be so sure? Is it really impossible that you may have stored 0 or NULL in a pointer anywhere, or alternatively not initialized some structure insufficiently, and then derefenced it? | I found the error which makes the kenel panic. As I tried to print "skb->mac.ethernet->h_proto " , probably sometimes it is a NULL pointer. I am not very
sure. I haven't read how the mac header works. However, after I removed the printk
statement. No segmentation fault any more.
However, I returned to the original question. Sometimes, I sent traffic based on the module,
everything works. However, sometimes, it made the whole machine HANG up. No any
kernel panic information in log file or console. Because I tried to debug the code to see
where is problem, I set some printk statements in every function. However, when I enabled
the printk statements, the machine doesn't hangs up ( at least, very lower possibility than disabling the printk statements.). Why could it be that?
I don't want to enable printk statments, because it really affected my measurements. such as
throughput, etc.
Any advice? Thanks a lot! |