commit | c1fd29a11f433ca8ae37723768016ffe6cdd487b | [log] [tgz] |
---|---|---|
author | Philipp Reisner <philipp.reisner@linbit.com> | Tue Aug 21 20:34:07 2012 +0200 |
committer | Philipp Reisner <philipp.reisner@linbit.com> | Fri Nov 09 14:08:20 2012 +0100 |
tree | d297c9ee730f292a2a789f9bbeceffde075afc26 | |
parent | 0ee98e2eb0c85f27b6f24a15d59fb54f99a93840 [diff] |
drbd: Fix a race condition that can lead to a BUG() If the preconditions for a state change change after the wait_event() we might hit the BUG() statement in conn_set_state(). With holding the spin_lock while evaluating the condition AND until the actual state change we ensure the the preconditions can not change anymore. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>