• Rusty Russell's avatar
    [PATCH] More barriers in module code. · fe3f6208
    Rusty Russell authored
    Paul McKenney convinced me that there's no *guarantee* that all archs
    will refuse the speculate the atomic ops above the state test, eg:
    
    CPU0 (stopref_set_state)		CPU1 (stopref)
    
     atomic_set(&ack, 0);			if (state == XXX)
     wmb();						atomic_inc(&ack);
     state = XXX;
    
    Certainly Alpha needs a rmb() inside stopref to guarantee it sees
    the same ordering.
    fe3f6208
module.c 48.8 KB