[PATCH] More barriers in module code.
commitfe3f6208a00f39df1c20c9e18bd55576ee1a1bd9
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 9 Oct 2003 00:42:12 +0000 (8 17:42 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Thu, 9 Oct 2003 00:42:12 +0000 (8 17:42 -0700)
tree2744e009396ebf8ee1d89fbfce39f6759d0f4e0f
parentb6e31b8e1e3b9fb29adcef9b1dde2b9865494c7c
[PATCH] More barriers in module code.

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.
kernel/module.c