drbd: fix race between deconfiguring and reconfiguring network
authorLars Ellenberg <lars.ellenberg@linbit.com>
Wed, 1 Sep 2010 07:50:23 +0000 (09:50 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 14 Oct 2010 16:38:27 +0000 (18:38 +0200)
commitc518d04fdec3d8b9d6f8b2228040934de9ee6708
tree8d749aa26634287fe59fba8fe181b0f43f36af1a
parent0778286a133d2d3f81861a4e5db308e359583006
drbd: fix race between deconfiguring and reconfiguring network

If a drbd_nl_net_conf hits the small window between the state change
to C_STANDALONE and the corresponding cleanup in after_state_ch,
that cleanup would throw away stuff we now need again,
and later trigger BUG_ON()s.

Fixed by properly serializing the new config request with
any pending cleanup.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_nl.c