Adding locks will not help solve this cache incoherence problem because locks only prevent certain parts of the code from running at a certain time; it will not prevent the fact that different values are written to the same location in different processors' local caches.
zmelnyk
To add to what's above: locks also can be affected by cache coherence issues which leads to two threads thinking they are holding the same lock at once depending on how they're implemented.
Adding locks will not help solve this cache incoherence problem because locks only prevent certain parts of the code from running at a certain time; it will not prevent the fact that different values are written to the same location in different processors' local caches.