I’m writing a Linux kernel (6.1.0-23-amd64) module with netfilter hooks. Module is loaded via insmod. There is no interaction with any userspace applications.
I found that global variable value in my module (i.e. memory buffer for network data processing) is occasionally rewritten with wrong data.
So the question is – what does this mean? How can I protect global vars from simultaneous rewriting?
Thanks.
Local variables are working perfectly – so there is definitely no problem with data itself.