I am writing a kernel module which keeps track of TCP packet transfer
in a structure which gets updated for every packet i see on this
connection.So far I have not added locking in my structure. If code
which modifies my struct when packet comes in and when packet goes
out ,modifies different field of structure , do i need to protect it
with locks ?? Will it happen in some machine architecture that my
code for modifying packets in one direction will execute at same
time ?? or this is what will happen on SMP systems and i should add
locking anyway. My code
executes at Netfilter hooks context. I am using LOCAL_IN and LOCAL_OUT
hooks from netfilter.