drbd: Fixed a race between disk-attach and unexpected state changes
authorPhilipp Reisner <philipp.reisner@linbit.com>
Wed, 2 Jun 2010 12:31:29 +0000 (14:31 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Mon, 14 Jun 2010 10:19:41 +0000 (12:19 +0200)
This was a very hard to trigger race condition.

If we got a state packet from the peer, after drbd_nl_disk() has
already changed the disk state to D_NEGOTIATING but
after_state_ch() was not yet run by the worker, then receive_state()
might called drbd_sync_handshake(), which in turn crashed
when accessing p_uuid.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>

No differences found